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

Update androidx #1626

Merged
merged 8 commits into from
Jul 25, 2019
Merged

Conversation

vokhuyetOz
Copy link

Just migrating to AndroidX

@vokhuyetOz
Copy link
Author

Oh, it is my mistake, I used react-native link twice

@vokhuyetOz
Copy link
Author

I will make a commit tomorrow

@jenshandersson
Copy link
Contributor

Thanks for this @vokhuyetOz. Looks like this forces people to use AndroidX? Or is this backwards compatible? (I'm not too familiar with Android :p )

@vokhuyetOz
Copy link
Author

Now, people have to use AndroidX whenever upgrade to new build tool version. As I know, google moves android support responsibilities to new location

@vokhuyetOz
Copy link
Author

From yesterday, I couldn’t build android app, the error is can’t import v4 AppCompat

@jenshandersson
Copy link
Contributor

Have you upgraded to RN 0.60RC? From my understanding this will only be required after upgrading to RN 0.60 react-native-community/discussions-and-proposals#129

@jenshandersson
Copy link
Contributor

And btw, I installed from your branch and then the android build fails. So it's not backwards compatible.

@vokhuyetOz
Copy link
Author

No, i still use 0.59

@vokhuyetOz
Copy link
Author

I just run it in example, i will check it again tomorrow, thank you for your report :)

@vokhuyetOz
Copy link
Author

@jenshandersson which error did you have?
i try and it works.

@vokhuyetOz
Copy link
Author

vokhuyetOz commented Jun 20, 2019

make sure that you have updated your gradle.properties and app/build.gradle.
i just have updated read.me file for this change :)

@WrathChaos
Copy link

Waiting for this PR :) Thank you @vokhuyetOz

@jenshandersson
Copy link
Contributor

@vokhuyetOz after doing your changes I get compile errors in other 3rd party libs... I assume those haven't been upgraded to use AndroidX then? One of them is react-native-gesture-handler (that is the error I'm getting as well).

> Task :react-native-gesture-handler:compileDebugJavaWithJavac FAILED
/Users/jensa/Developer/jensun/wingsy/RNWingsy/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEvent.java:3: error: package android.support.v4.util does not exist
import android.support.v4.util.Pools;
> Task :react-native-purchases:compileDebugJavaWithJavac FAILED
/Users/jensa/Developer/jensun/wingsy/RNWingsy/node_modules/react-native-purchases/android/src/main/java/com/reactlibrary/RNPurchasesModule.java:4: error: package android.support.annotation does not exist
import android.support.annotation.Nullable;

How do you propose I/we move forward with this? If we would merge this PR then a lot of people would have the same issues, right? (Sorry again for being a bit slow on the Android side)

@vokhuyetOz
Copy link
Author

a lot of libraries must migrate to AndroidX to fix it

@vokhuyetOz
Copy link
Author

i am also making a pull request for another library

@vokhuyetOz
Copy link
Author

i think i should make a PR for react-native-gesture-handler to fix it

@vokhuyetOz
Copy link
Author

@WrathChaos could you test this project?

@WrathChaos
Copy link

@vokhuyetOz I already tried it, other libraries also crushes :( We need to update all of them... AndroidX ruined my day..

@vokhuyetOz
Copy link
Author

you should create a new project and check only this library :)

@WrathChaos
Copy link

@vokhuyetOz I will try it when I have time :) Thank you for this contribution anyway.

@jenshandersson
Copy link
Contributor

@vokhuyetOz after speaking to @kelset I now understand that AndroidX upgrade is not required. Since rn-video has a + as fallback in the build.gradle it will automatically pull in the latest version, and that is AndroidX. Instead of + we need to specify a version. (Anyone with Android knowledge please jump in here if I'm wrong)

Can you please create a new PR with setting explicit versions instead. Upgrading to 28 is fine. But we can't force a AndroidX upgrade of all users right now. See this PR: react-native-device-info/react-native-device-info@9588763

We will keep this PR as it will be required to move to AndroidX for RN 0.60, but let's wait with that.

@vokhuyetOz
Copy link
Author

Thank you, at the moment, it is not required, but from 11/2019 developers must update their apps whenever create or update new version. I will take a look at react native device info and make a change

@vokhuyetOz
Copy link
Author

@jenshandersson please check out #1629 . thank you !

@n1ru4l n1ru4l requested review from cobarx, n1ru4l and CHaNGeTe July 4, 2019 08:03
@n1ru4l
Copy link
Contributor

n1ru4l commented Jul 4, 2019

react-native 0.60 has now its first stable release. Should merge this asap and publish a new major release.

@CHaNGeTe
Copy link
Contributor

CHaNGeTe commented Jul 5, 2019

This PR will make also possible to update exoplayer to 2.10.x? or totally unrelated?

examples/basic/android/build.gradle Outdated Show resolved Hide resolved
examples/basic/android/settings.gradle Outdated Show resolved Hide resolved
@CHaNGeTe
Copy link
Contributor

CHaNGeTe commented Jul 9, 2019

Can we align with this PR also?
#1660

@CHaNGeTe CHaNGeTe mentioned this pull request Jul 9, 2019
@vokhuyetOz
Copy link
Author

Yes, of course

@CHaNGeTe
Copy link
Contributor

@vokhuyetOz does this change the min version of React required?

@vokhuyetOz
Copy link
Author

vokhuyetOz commented Jul 13, 2019

@CHaNGeTe no, it doesn't relate to min version of react required, sorry for my late.

@CHaNGeTe
Copy link
Contributor

hey @ashnfb @cobarx @n1ru4l @jenshandersson I need another approval for this one

Copy link
Contributor

@n1ru4l n1ru4l left a comment

Choose a reason for hiding this comment

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

Legit for breaking change release (major version number bump)

@CHaNGeTe
Copy link
Contributor

What makes it breaking change? (if RN version required does not change)

@n1ru4l
Copy link
Contributor

n1ru4l commented Jul 20, 2019

Doesn’t this force the user into changing their grade setup/ using jetifier?

@CHaNGeTe
Copy link
Contributor

ok! clear now!

Make installation parts easier to link
Make more obvious the changes needed via using diff
@CHaNGeTe
Copy link
Contributor

@vokhuyetOz I am preparing the merge. Do you know the minimum required gradle version for this to work?

@agungkes
Copy link

Aha it's good to know this PR will merge
Thanks you @CHaNGeTe

@karltaylor
Copy link
Contributor

Woohoo! 🎉

implementation "com.android.support:support-annotations:${safeExtGet('supportLibVersion', '+')}"
implementation "com.android.support:support-compat:${safeExtGet('supportLibVersion', '+')}"
implementation "com.android.support:support-media-compat:${safeExtGet('supportLibVersion', '+')}"
// implementation "com.android.support:support-annotations:${safeExtGet('supportLibVersion', '+')}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

can this be removed instead of commented out?

@@ -108,6 +111,7 @@ android {
release {
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
matchingFallbacks = ['release', 'debug']
Copy link
Collaborator

Choose a reason for hiding this comment

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

why is this needed?

Copy link
Author

Choose a reason for hiding this comment

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

i don't remember exactly why i add it. i will remove it in the next commit :D

@vokhuyetOz
Copy link
Author

vokhuyetOz commented Jul 24, 2019

@vokhuyetOz I am preparing the merge. Do you know the minimum required gradle version for this to work?

sorry, i don't find any information about the minimum required gradle version. But i find
Screen Shot 2019-07-24 at 9 08 05 AM

Hope it helps you!

@CHaNGeTe CHaNGeTe merged commit 1fb07b5 into TheWidlarzGroup:release/5.0.0 Jul 25, 2019
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.

8 participants