feat: Adopt AGP v9#733
Conversation
|
Added comments on the files which targets the scope of this PR, the rest changes will be gone once the linked PR is merged. |
|
Hello :D Since the other PR was fixed and merged can you maybe update this with just the 2 changes and retest that everything works fine ? @hurali97 |
| javapoet = "1.13.0" | ||
| junit = "4.13.2" | ||
| -kotlin = "2.1.20" | ||
| +kotlin = "2.2.0" |
There was a problem hiding this comment.
This change is required as we bumped Gradle version in example app. React Native core defaults to this kotlin version from RN 0.87.x. RN Core also defaults to Gradle version 9.4.1 from RN 0.87.x
|
@MeliValesca - Synced the PR with the latest main and tested on: Example Apprnsa.movRN v0.86.0 App which defaults to AGP 8RNapp.movRegarding the failing test, it happens because I have bumped the spotless plugin and now formatting doesn't align with the latest. Even though bumping spotless plugin is not required, I did it for the latest behavior's sake. Let me know if you'd like for this change to be dropped OR if we can accept the bump, we need to run |
You can keep the change and commit the formatting diff, thanks! |
Summary
This PR is rasied following the second phase of the RFC around AGP v9 adoption:
RFC: react-native-community/discussions-and-proposals#1006
The gist of this PR is to make Gesture Handler AGP v9 compliant with backward compatibility. The main scope of changes is the
react-native-safe-area-context/android/build.gradle. The rest of the changes can be considered temporary.The rest changes include:
Gradletov9.4.1gradle.propertiesIdeally, we should not enable the opt outs and leverage the AGP 9 built-in kotlin and newDSL. However, if we do not do it, then other libraries which are not yet AGP v9 compliant starts to fail. Hence, we need to keep the opt outs enabled for a while. For the context, react-native starting from 0.87.x will ship with AGP v9 and opt outs enabled by default for the new apps, which is the first phase of AGP v9 adoption.
With the second phase when the libraries starts adoption AGP v9, we can eventually remove the opt outs from Example.
Test Plan
To test this PR, we need to do a few steps:
agpversion to9.2.1andkotlinto2.2.0inreact-native-gradle-pluginreact-native-gradle-pluginThis step is only required because we have RN version on 0.85.2 and
AGP+kotlinbump will be shipped with 0.87.x.Verified by locally patching RN screens, async-storage etc., making those AGP v9 compliant and removing the opt outs to test the changes in the PR
agp-9.mov
Verified these changes work with AGP 8
agp-8.mov