diff --git a/docs/platforms/android/New-Android-version.md b/docs/platforms/android/New-Android-version.md index 6ead79eb4a..d632582056 100644 --- a/docs/platforms/android/New-Android-version.md +++ b/docs/platforms/android/New-Android-version.md @@ -66,6 +66,19 @@ In the engine, you may follow [Upgrading Engine's Android API version](https://g - Example Framework PR: . - Example Engine PR: . +##### Update Java Version in CI (Only for Java LTS Release) + +Every few years Java releases a new Java LTS (long-term support) version, which typically +becomes the industry standard for a few years. As users adopt the new Java LTS version, either +directly or as part of the latest Android SDK, we want to update our CI to test against the new Java version +to identify and address potential compatibility issues. + +Upload the new Java Version package to CIPD following the instructions [here](/docs/platforms/android/Uploading-New-Java-Version-to-CIPD.md). + +Update the usages of the current Java version to the new Java version in CI. + +- Example PR: . + #### Update documentation Update documentation page to indicate the new API is tested diff --git a/docs/platforms/android/Uploading-New-Java-Version-to-CIPD.md b/docs/platforms/android/Uploading-New-Java-Version-to-CIPD.md new file mode 100644 index 0000000000..db1ba62228 --- /dev/null +++ b/docs/platforms/android/Uploading-New-Java-Version-to-CIPD.md @@ -0,0 +1,72 @@ +# Uploading New Java Version to CIPD + +We store the Java Version package on CIPD for use on CI. For more information read the internal +docs [here](http://go/luci-cipd). + +Some links in the instructions below are Google-internal. + +## Steps + +### Request Access to CIPD + +1. Request temporary write access to upload packages to CIPD + via http://go/flutter-luci-cipd#requesting-write-read-access-to-cipd-packages. + +2. 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](https://chrome-infra-auth.appspot.com/auth/groups/google%2Fflutter-cipd-writers@twosync.google.com). + +### Download the New Java Version and Set Up for CIPD Upload + +3. Download the new Java version via OpenJDK (not Oracle's Java for licensing/legal + reasons) [here](https://openjdk.org/projects/jdk/) for the following platforms: + linux-amd64(aka x64), mac-arm64, mac-amd64, and windows-amd64. + +4. Download the latest Java version from + CIPD [here](https://chrome-infra-packages.appspot.com/p/flutter/java/openjdk) for the following + platforms: linux-amd64(aka x64), mac-arm64, mac-amd64, and windows-amd64. + +5. Unzip the new Java version and the latest version. + +6. Add a file titled `openjdk.cipd.yaml` at the top-level directory. Copy the contents below into + the file and replace contents in <> for your new Java version package: + ```sh + package: flutter/java/openjdk/ + description: OpenJDK for + install_mode: copy + data: + # This directory contains Java to be used in automated tests. + - dir: . + ``` + + Note: `linux-amd64` is an example of `` + +7. Ensure the file/directory structure of the new Java version package to be uploaded is the same as + the structure at the top-level of the latest from CIPD. + This involves potentially deleting contents of the top-level directory. + +### Upload to CIPD + +8. To run CIPD commands, please run this command: + + ```sh + cipd auth-login + ``` + +9. To upload the new Java version to CIPD, please run this command: + + ```sh + cipd create -in -name flutter/java/openjdk/ -tag version: + ``` + + Note: Please check you have the correct name, tags, package structure before uploading to CIPD + because deleting the package on CIPD is difficult. + +10. Check to see if your new Java version has successfully uploaded to CIPD by clicking on the + relevant platform [here](https://chrome-infra-packages.appspot.com/p/flutter/java/openjdk). + +### Troubleshooting CIPD (Optional) + +If you accidentally uploaded the incorrect package to CIPD, you can delete the tag using these +instructions [here](go/flutter-luci-playbook#remove-duplicated-cipd-tags). +Then, re-upload the correct Java version pacakge to CIPD. \ No newline at end of file