Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
android build: Update Gradle to 6.0.1.
Part of the RN v0.61 -> v0.62 changes to the template app [2], corresponding to the following commits: - facebook/react-native@be2a2529a - facebook/react-native@b1c954b1f - facebook/react-native@ff6b2ff32 - facebook/react-native@928f4434b - facebook/react-native@701e66bde Probably best to do this before the main upgrade commit. We treat this as an upgrade from 5.5.x to the latest 5.6.x (which is the latest 5.x), and then to 6.0.1 (the latest 6.0.x). [1] - facebook/react-native@be2a2529a also added some comments in gradle.properties, which we reproduce. - We ran into a couple of different build failures, so, add those to the troubleshooting doc with the cache-clearing commands that worked to resolve them (from SO [3]). Release notes from Gradle upstream: https://docs.gradle.org/5.6.4/release-notes.html https://docs.gradle.org/6.0.1/release-notes.html Upgrade guides: https://docs.gradle.org/5.6.4/userguide/upgrading_version_5.html#changes_5.6.4 https://docs.gradle.org/6.0.1/userguide/upgrading_version_5.html#changes_6.0.1 We didn't spot any deprecations or announced breaking changes as applying to us, though it's a bit hard to tell (in particular, we use plenty of Gradle code that isn't ours, so we wouldn't necessarily spot something). We hope we'd catch any by just trying the build, e.g., with `tools/test android --full`. The upgrade guides recommend a "build scan", which we did by running `./gradlew help --scan`. In particular, the upgrade guides ask that you find a "Deprecations" section in the left nav of a web page showing the result of the scan. The build scan report at v5.6.4 [4] doesn't have a "Deprecations" section. This might mean that the feature was missing at that version, or it might mean that it looked for deprecations expressed in a certain way [5] and didn't find any. The report at v6.0.1 [6] did have a "Deprecations" section, with the following two warnings: """ BuildListener#buildStarted(Gradle) has been deprecated. This is scheduled to be removed in Gradle 7.0. 32 usages The maven plugin has been deprecated. This is scheduled to be removed in Gradle 7.0. Please use the maven-publish plugin instead. 19 usages """ Expanding the 32 usages in the first of these, all but one are in the `com.android.library` plugin; one is in the `android` plugin. Expanding the 19 usages in the second of these, they're all in the `org.gradle.maven` plugin. In the console output from the build-scan command at both versions (shown in the build scan reports) we see some deprecation warnings from the Android Gradle Plugin, rather than Gradle itself. They apply to three of our dependencies, and we have issues to replace those dependencies (two of the issues filed just now): - `react-native-photo-view`; see zulip#4217 - `react-native-text-input-reset`; see zulip#4239 - `react-native-device-info`; see zulip#4240 [1] See discussion around zulip#4244 (comment) for some nuances about this. [2] https://react-native-community.github.io/upgrade-helper/?from=0.61.5&to=0.62.2 [3] https://stackoverflow.com/a/62025502 [4] https://gradle.com/s/2szkm2hvdrejy. The build scan at this link will be "available indefinitely", according to https://scans.gradle.com/. [5] zulip#4244 (comment) [6] https://scans.gradle.com/s/l7q26kntclub6
- Loading branch information