We store multiple Gradle version packages on CIPD for use on CI. For more information read the internal docs here.
Some links in the instructions below are Google-internal.
Request temporary write access to upload packages to CIPD via https://goto.google.com/flutter-luci-cipd#requesting-write-read-access-to-cipd-packages.
Wait about 5-30 minutes for access rights to sync. To check if your rights have synced, see if you are a member of this group here.
Identify the new Gradle Version to include in the upload script. From the dev folder run:
git grep "distributionUrl" | sed -E 's/.*\/gradle-([0-9.]+[^.]*)\.zip.*/\1/'
For REPLACEME versions check the ModuleTest versions here.
Update the versions array with these new versions in the generate_gradle_cipd_packages.dart script. Gradle distributions in the dev folder should only use the ‘bin’ distribution type.
To run CIPD commands, please run this command:
cipd auth-login
Dry run the generate_gradle_cipd_packages.dart script from the root of the flutter checkout:
dart run engine/src/flutter/tools/gradle/generate_gradle_cipd_packages.dart --dry-run
Ensure everything looks correct fo the dry run.
Note: Please check you have the correct name, tags, package structure before uploading to CIPD because deleting the package on CIPD is difficult.
Run without --dry-run
Check to see if your new Gradle version has successfully uploaded to CIPD by clicking on the relevant dir here.
If you accidentally uploaded the incorrect package to CIPD, you can delete the tag using these instructions here. Then, re-upload the correct Gradle version package to CIPD.