Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit f6aeec2

Browse files
authored
Update docs to use new Gradle version in the engine (#53964)
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 #53574. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
1 parent 1bfd06c commit f6aeec2

File tree

1 file changed

+31
-17
lines changed

1 file changed

+31
-17
lines changed

tools/gradle/README.md

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,40 @@
1-
# Updating gradle version used in engine repo
1+
# Updating the Gradle version used in flutter/engine repo
22

33
The instructions in this README explain how to create a CIPD package that
4-
contains the gradle build-time dependency of the Android embedding of the Engine.
5-
The Android embedder is shipped to Flutter end-users, but gradle is not.
4+
contains the [Gradle](https://gradle.org/) build-time dependency of the Android embedding of the engine.
5+
The Android embedder is shipped to Flutter end-users, but Gradle is not.
66

77
## Requirements
88

9-
1. If you have a flutter/engine checkout, then you should already have
10-
[Depot tools](http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up) on your path.
11-
1. Ensure you have write access for cipd. go/flutter-luci-cipd
12-
1. Download the new version of gradle then verify the checksum,
13-
and unzip into a local directory.
9+
1. Ensure that you have [Depot tools](http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up)
10+
on your path. If you have a flutter/engine checkout, then you should already have it on your path.
11+
2. Ensure that you have write access for CIPD. See go/flutter-luci-cipd for instructions on how to
12+
request access.
1413

15-
## Update CIPD Steps
16-
These steps use gradle version 7.5.1 as an example.
14+
## Steps to download and verify new Gradle version
15+
These steps use Gradle version 7.5.1 as an example. Please replace 7.5.1 with the actual
16+
Gradle version that you wish to use.
1717

18-
1. Unzip gradle into a folder `unzip gradle-7.5.1-all.zip`
19-
1. Authenticate with cipd `cipd auth-login`
20-
1. Run `cipd create -in gradle-7.5.1 -install-mode copy -tag version:7.5.1 -name flutter/gradle`
21-
1. Update `engine/src/flutter/DEPS` gradle entry to contain the tag from the command above.
22-
1. Run `gclient sync` to verify that dependency can be fetched.
18+
1. Download the new version of Gradle you'd like from [the Gradle website](https://gradle.org/releases/).
19+
Please download the "complete" version.
20+
2. Verify the checksum. To do this, first check the checksum of the complete (-all) ZIP Gradle version you
21+
downloaded from https://gradle.org/release-checksums/. Then, run `shasum -a 256 gradle-7.5.1-all.zip` to
22+
check the checksum of the Gradle version you downloaded. Verify that the checksum outputted by this
23+
command and the one from the Gradle website match.
24+
3. Unzip the Gradle download into a folder by running `unzip gradle-7.5.1-all.zip`.
25+
26+
## Steps to upload new Gradle version to CIPD
27+
These steps use Gradle version 7.5.1 as an example. Please replace 7.5.1 with the actual
28+
Gradle version that you downloaded and verified.
29+
30+
1. Authenticate with CIPD by running `cipd auth-login`.
31+
2. Run `cipd create -in gradle-7.5.1 -install-mode copy -tag version:7.5.1 -name flutter/gradle` to
32+
upload the new Gradle version to CIPD.
33+
3. Update the `engine/src/flutter/DEPS` Gradle entry (which should look something like [this](https://github.com/flutter/engine/blob/4caaab9f2502481b606b930abeea4a361022fa16/DEPS#L732-L743))
34+
to contain the tag from the command above (version:7.5.1).
35+
4. Run `gclient sync` to verify that the dependency can be fetched.
2336

2437
## Useful links
25-
* CIPD gradle https://chrome-infra-packages.appspot.com/p/flutter/gradle/+/
26-
* Gradle Releases https://gradle.org/releases/
38+
* CIPD Gradle package: https://chrome-infra-packages.appspot.com/p/flutter/gradle/+/
39+
* Gradle releases: https://gradle.org/releases/
40+
* Gradle distribution and wrapper JAR checksum reference: https://gradle.org/release-checksums/

0 commit comments

Comments
 (0)