Upgrade Gradle to 7.4 & AGP to 7.1.1 (& Disable Jetifier & Min SDK Version)#2
Upgrade Gradle to 7.4 & AGP to 7.1.1 (& Disable Jetifier & Min SDK Version)#2
Conversation
The 'com.dipien.byebyejetifier' plugin was used to determine whether Jetifier can be disable for this project. After configuring 'Bye Bye Jetifier' and running the below command: ./gradlew canISayByeByeJetifier -Pandroid.enableJetifier=false The output was clear, Jetifier can be now safely disabled for this project: > Task :canISayByeByeJetifier ========================================= Project: : ========================================= * No legacy android support usages found ===================================================== ... * No dependencies with legacy android support usages! ... ===================================================== ... ... =============================== ... You can say Bye Bye Jetifier. * ... ===============================
This was done because Lint otherwise fails with the below message: "uses-sdk:minSdkVersion 16 cannot be smaller than version 21 declared in library [com.facebook.react:react-native:0.64.0] /Users/<user>/ .gradle/caches/transforms-3/49f36d12f575c939d228607cd5223ea8/ transformed/react-native-0.64.0/AndroidManifest.xml as the library might be using APIs not available in 16" The 'minSdkVersion=21' is used because all the other node module fork libraries are also using the same version and as such this matches with everything else.
This solves the issue with 'npm install && npm pack' not being able to generate a new tarball. For more info you can reference this comment: https://github.com/ react-native-community/react-native-template-typescript/ issues/203#issuecomment-946254950
|
👋 @hypest ! Can you verify that this change I did here, which updates the PS: I did that because otherwise Lint fails for both, this repo and the |
Happy to help @ParaskP7 ! Can you share the GB PR or the WPAndroid PR to test it out? Thanks! |
Thank you @hypest ! You can test by running Lint on this repo and see the outcome if you revert my change from PS: I am currently working on creating the |
|
Thanks for the testing info @ParaskP7 , I verified it on my side that lint is not complaining with the I wonder if this is a change we should push upstream 🤔 , wdyt? |
Thanks for verifying that @hypest ! 🙇
As I explained on my commit message, since all other such forked repos are already pointing to a In addition to that, on the |
|
Verified that the lint error is related to the gradle and AGP update anyway so, pushing the minSDK change upstream would also require pushing all the android build diff so far, and I think that's outside the scope for the effort here. So, I'm cool from my side to contain the changes here. |
So, just to get this right @hypest you too think that this change of PS: We will anyway be testing |
|
Oh, yeah, I don't expect the minSDKVersion bump to 21 to be a problem for Gutenberg, especially since it's already the minimum for RN itself. Besides, as you mention, we'll try it more via the WPAndroid and Gutenberg PRs. |
|
We are retiring this repo so, no need for further work on this PR. Thank you for the hard work on this this far folks! ❤️ |
This PR is part of Upgrade Gradle to 7.4 & AGP to 7.1.1 (& Disable Jetifier) PR. There are
13libraries that are upgraded toGradle 7.4&AGP 7.1.1(&Disable Jetifier).All those PRs follow the general outline below:
Gradleversion upgraded to7.3.3with the./gradlew wrapper --gradle-version=7.3.3 --distribution-type=allcommand.AGPversion upgrade to7.0.4(seeandroid/settings.gradle.ktschange).Gradle 7.4&AGP 7.1.1.android/gradle.propertieschange).1.9.0-wp-2(seepackage.json).1.9.0-wp-2(seereact-native-clipboard-clipboard-1.9.0-wp-2.tgz).This PR also included the following changes:
21(seeandroid/gradle.propertieschange).To test - Now
These changes can be tested as part of the gutenberg PR which is updated to use the temporarily non-tagged node module project dependencies generated with these changes.
To test - Later ⚙️
These changes can be tested as part of the gutenberg-mobile PR ⚙️ or WordPress-Android PR ⚙️ which is updated to use the bundle ⚙️ generated with these changes.
FYI: It's best to leave the testing step to the gutenberg PR review since even if these PRs are merged, they won't impact anything until the package.json file is updated. Worst case scenario, a follow up PR will get opened to fix any issues that are found during testing.
Follow up
Once these PRs are merged in, a new tag will get created for each library and the package.json file will be again updated accordingly.