Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(jcenter): remove jcenter #500

Merged
merged 7 commits into from Oct 22, 2021

Conversation

Bibazavr
Copy link
Contributor

@Bibazavr Bibazavr commented Sep 28, 2021

Overview

Builds will no longer be able to resolve artifacts from JCenter after February 1st, 2022 because jcenter servers shut down

so, I remove jcenter and update react-native (since 0.65.1 they don't use jcenter)

  • fixed example - don't work, because one '/../' was deleted (fab577d)
  • fixed eslint configures
  • fixed jest configures

Fixes #499

Test Plan

Just start up example and make sure everything is ok:)

Builds will no longer be able to resolve artifacts from JCenter after February 1st, 2022 because jcenter servers shut down

so, I remove jcenter and update react-native (since 0.65.1 they don't use jcenter)

+ fixed example - don't work, because one '/../' was deleted (fab577d)
+ fixed eslint configures
+ fixed jest configures

BREAKING CHANGE: remove jcenter
  update React Native to 0.65.1
  minSdkVersion=16
Refs: react-native-netinfo#499
Copy link
Contributor

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow! Upgrading the example app is a lot of work, this is a difficult task but is really needed, thanks for posting this.

I had some specific questions about a few of the choices made while you did the upgrade but make no mistake - this is really cool, and I'm excited to see the example app updated and jcenter removed.

I will note that jcenter has specifically said they'll keep the repo up indefinitely, so this is not an urgent matter, but at the same time removing it is the right thing to do. The upgrade of react-native is the really useful thing IMHO :-). See the updates on https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/ for backup on my assertion jcenter will stay available

jest.config.js Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/internal/nativeInterface.ts Show resolved Hide resolved
android/gradle.properties Outdated Show resolved Hide resolved
example/android/app/build.gradle Show resolved Hide resolved
@Bibazavr
Copy link
Contributor Author

@mikehardy, What about "Resolve conversation"? You will resolve them after reading or i should do this?:o

I hope my English is not so terrible - i try my best:D

@mikehardy
Copy link
Contributor

Your English is really good actually, no worries there 💪

If I started them I prefer to resolve, that's how I know I've verified the resolution on re-review

It's only 630am here though so I need some coffee first ☕

Copy link
Contributor

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty good in general now - thank you for backing out all the breaking stuff. The 275,000 downloads the module gets a week will appreciate not having a breaking change :-)

I notice you added a move of the java classes, and also there was a buildTools version thing I committed a fix for that made me think you've never run the example on android, as it should not work.

Can you run this locally on web + ios + android and verify it's working? I suspect after you've moved the example java classes you need an AndroidManifest change as well for the new package name?

fix:
- applicationId for react-native run-android.
- update podfile for new react-native
- refactoring react-native.config.js for better developer experience
@Bibazavr
Copy link
Contributor Author

Bibazavr commented Oct 1, 2021

This looks pretty good in general now - thank you for backing out all the breaking stuff. The 275,000 downloads the module gets a week will appreciate not having a breaking change :-)

Of course, you right:)

Can you run this locally on web + ios + android and verify it's working? I suspect after you've moved the example java classes you need an AndroidManifest change as well for the new package name?

I moved files because package was not satisfying directory

screens

was:
was

now:
became

I was run android but by using `./gradlew build && ./gradlew installDebug`:o

Today i figured why react-native run-android not works (it was before me):

  • applicationId was wrong into example/android/app/build.gradle
  • and add some stuff to react-native.config.js:

Now react-native run-android works perfectly:3

But I could not do same with react-native run-ios:c (but build from xcode works fine)

And proof of work:

ios and android

web

Copy link
Contributor

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reproduced your success with android example (nice!) and I got iOS example working in the last commit I just added on to this. Could you pull my changes and make sure everything still works for you?

@Bibazavr
Copy link
Contributor Author

Bibazavr commented Oct 4, 2021

I could not test on weekend. Today i launched example and it looks like ios simulator scarry of something:D

2021-10-04.08.05.11.mov

Maybe its my PC broke

@mikehardy
Copy link
Contributor

I am going to say that is your PC not working right somehow hahaha - it looks to me like the bundler is fast-refreshing over and over (giving you that little top-bar appearance/disappearance which makes the content move). I'm certain the iOS was working (and the android also worked for me), so if it ran at all I am going to call it a win. It did not work before, so it is certainly better.

@mikehardy
Copy link
Contributor

My last test on this one is that I want to test the built module from this change with an older react-native (I'll probably do 0.60 so I don't have to manually link...) just to make sure it works. It should but who knows - I don't want to accidentally release a breaking change as I have done that before and it is a real emergency when it happens. No fun at all

@mikehardy
Copy link
Contributor

Haven't had time yet but to be specific about the test I want to see in case someone has time:

What I want to do is take the result of building react-native-netinfo from that PR (yarn pack or similar) and use that locally in a sample app from a npx react-native init --version 0.60.6 to make sure it works

@Bibazavr
Copy link
Contributor Author

@mikehardy, it works but i tested only android and useNetInfo hook

https://github.com/Bibazavr/netinfooldrntest

@mikehardy
Copy link
Contributor

Oh hey that's a really big help! I can pull that and check ios. This has been nagging at me without enough time, seriously thanks for helping out

@mikehardy
Copy link
Contributor

Checks out on ios -

and "today I learned" that react-native 0.60 cannot even be compiled by Xcode-12.5 (much less Xcode 13 or 13.1 about to come out...) you have to use Xcode 12.4 with it. I happen to have those laying around as side-by-side installs but I can't believe people are still using those. Starting in April 2022 (6 months from now) Xcode 13 will be required for App Store submission and only react-native 0.62+ will compile on Xcode 13

Copy link
Contributor

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go

@mikehardy mikehardy merged commit 94c5398 into react-native-netinfo:master Oct 22, 2021
github-actions bot pushed a commit that referenced this pull request Oct 22, 2021
## [6.0.3](v6.0.2...v6.0.3) (2021-10-22)

### Bug Fixes

* **android, jcenter:** remove jcenter dependency / update example ([#500](#500)) ([94c5398](94c5398))
@matt-oakes
Copy link
Collaborator

🎉 This PR is included in version 6.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

jcenter shut down soon
3 participants