mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Updates/corrects steps to update Gradle version used in the engine based on what @gmackall and I did to update the engine's Gradle version in https://github.com/flutter/engine/pull/53574. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Updating the Gradle version used in flutter/engine repo
The instructions in this README explain how to create a CIPD package that contains the Gradle build-time dependency of the Android embedding of the engine. The Android embedder is shipped to Flutter end-users, but Gradle is not.
Requirements
- Ensure that you have Depot tools on your path. If you have a flutter/engine checkout, then you should already have it on your path.
- Ensure that you have write access for CIPD. See go/flutter-luci-cipd for instructions on how to request access.
Steps to download and verify new Gradle version
These steps use Gradle version 7.5.1 as an example. Please replace 7.5.1 with the actual Gradle version that you wish to use.
- Download the new version of Gradle you'd like from the Gradle website. Please download the "complete" version.
- Verify the checksum. To do this, first check the checksum of the complete (-all) ZIP Gradle version you
downloaded from https://gradle.org/release-checksums/. Then, run
shasum -a 256 gradle-7.5.1-all.zipto check the checksum of the Gradle version you downloaded. Verify that the checksum outputted by this command and the one from the Gradle website match. - Unzip the Gradle download into a folder by running
unzip gradle-7.5.1-all.zip.
Steps to upload new Gradle version to CIPD
These steps use Gradle version 7.5.1 as an example. Please replace 7.5.1 with the actual Gradle version that you downloaded and verified.
- Authenticate with CIPD by running
cipd auth-login. - Run
cipd create -in gradle-7.5.1 -install-mode copy -tag version:7.5.1 -name flutter/gradleto upload the new Gradle version to CIPD. - Update the
engine/src/flutter/DEPSGradle entry (which should look something like this) to contain the tag from the command above (version:7.5.1). - Run
gclient syncto verify that the dependency can be fetched.
Useful links
- CIPD Gradle package: https://chrome-infra-packages.appspot.com/p/flutter/gradle/+/
- Gradle releases: https://gradle.org/releases/
- Gradle distribution and wrapper JAR checksum reference: https://gradle.org/release-checksums/