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(android, api31): use api31 compatible transitive androidx deps #3055

Closed
wants to merge 2 commits into from

Conversation

mikehardy
Copy link
Contributor

@mikehardy mikehardy commented Nov 4, 2021

Description

This PR enables apps using Detox to raise targetSdkVersion to 31

The activities exported by the libraries in the updated dependency
versions correctly specify "android:exported" attributes, so apps
that use Detox may successfully bump their targetSdkVersion to 31

Related #2899 - Detox already ran on Android12 but apps using Detox could not target API31
Related #3033 - CI failures without JDK11 and is updating lots of things at once, this is focused

#3033 is useful but looks like it will take a while, this unblocks Detox-using apps right now

The activities exported by the libraries in the updated dependency
versions correctly specify "android:exported" attributes, so apps
that use Detox may successfully bump their targetSdkVersion to 31
mikehardy added a commit to invertase/react-native-firebase that referenced this pull request Nov 5, 2021
@mikehardy
Copy link
Contributor Author

Sadly, this fails react-native 0.59 detox testing as well: https://jenkins-oss.wixpress.com/job/detox-android-59-9-pr/2397/console - it may be that react-native 0.59 is an intractable problem at this point and minimum compatible react-native could be raised

@mikehardy mikehardy mentioned this pull request Nov 5, 2021
mikehardy added a commit to invertase/react-native-firebase that referenced this pull request Nov 5, 2021
previously the android gradle plugin in use for tests would
be 3.4.x for early react-native versions, but that appears to
be incompatible with modern test deps needed for Android 12

3.6.x is the oldest compatible version of the plugin
@mikehardy
Copy link
Contributor Author

Not sure what is going on with RN59 Jenkins, I was able to build the app successfully locally following the CI script 🤷

You do need the second commit that bumps up the android gradle plugin in use, as far as I can tell, but whatever the compileSdkVersion issue is I can't figure out. Spending any time at all on react-native 0.59 feels like time wasted at this point so I'm going to leave it.

@mikehardy
Copy link
Contributor Author

For anyone that needs detox to work on an app using targetSdkVersion 31 you may use the patch-package patch from this change here: https://github.com/invertase/react-native-firebase/pull/5835/files#diff-c3c4ac892ab301a8340adc456d7acef27b5ece166b125c2acd237628f4a83539

It does work!

I expect this PR to superceded by #3033 though (which is great, that's a full upgrade of everything including example apps here) so the PR itself may not go anywhere even though the change is functional and works

@stale
Copy link

stale bot commented Dec 8, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Thank you for your contributions.
For more information on bots in this reporsitory, read this discussion.

@stale stale bot added the 🏚 stale label Dec 8, 2021
@stale
Copy link

stale bot commented Dec 16, 2021

The issue has been closed for inactivity.

@stale stale bot closed this Dec 16, 2021
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.

1 participant