From 5be3b4b0f0e9236275a3d365f57305eec9f216da Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Mon, 22 May 2023 06:19:41 -0700 Subject: [PATCH] Upgrade GitHub workflow java version (#4750) Summary: [android] Upgrade GitHub workflow java version Version 8 of AGP requires Java 17+. Let's upgrade it here. There are some flags that are no longer supported, hence the update to gradle.properties. Pull Request resolved: https://github.com/facebook/flipper/pull/4750 Test Plan: - CI --- Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/flipper/pull/4750). * https://github.com/facebook/flipper/issues/4755 * https://github.com/facebook/flipper/issues/4754 * https://github.com/facebook/flipper/issues/4753 * https://github.com/facebook/flipper/issues/4752 * https://github.com/facebook/flipper/issues/4751 * __->__ https://github.com/facebook/flipper/issues/4750 * https://github.com/facebook/flipper/issues/4749 Reviewed By: antonk52 Differential Revision: D46067505 Pulled By: passy fbshipit-source-id: b673535ac9bd08a35bdb61b9a9ec0a38c957ceef --- .github/workflows/android-sample.yml | 2 +- .github/workflows/publish-android.yml | 2 +- gradle.properties | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/android-sample.yml b/.github/workflows/android-sample.yml index 3b12b5744..987512278 100644 --- a/.github/workflows/android-sample.yml +++ b/.github/workflows/android-sample.yml @@ -11,7 +11,7 @@ jobs: - name: set up JDK uses: actions/setup-java@v1 with: - java-version: 11 + java-version: 17 - name: Compute build cache run: ./scripts/checksum-android.sh checksum-android.txt - uses: actions/cache@v2 diff --git a/.github/workflows/publish-android.yml b/.github/workflows/publish-android.yml index ce9f9794a..c9bb90351 100644 --- a/.github/workflows/publish-android.yml +++ b/.github/workflows/publish-android.yml @@ -21,7 +21,7 @@ jobs: - name: set up JDK uses: actions/setup-java@v1 with: - java-version: 11 + java-version: 17 - name: Write GPG Sec Ring run: echo '${{ secrets.GPG_KEY_CONTENTS }}' | base64 -d > /tmp/secring.gpg - name: Update gradle.properties diff --git a/gradle.properties b/gradle.properties index 9b93fa895..157db801a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -27,7 +27,8 @@ NDK_VERSION=25.1.8937393 # Gradle internals org.gradle.internal.repository.max.retries=10 org.gradle.internal.repository.initial.backoff=1250 -org.gradle.jvmargs=-Xmx2g -Xms512m -XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled +# The --add-opens is required for Litho's annotation processor on JDK 17 +org.gradle.jvmargs=-Xmx2g -Xms512m --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED systemProp.org.gradle.internal.http.connectionTimeout=120000 systemProp.org.gradle.internal.http.socketTimeout=120000 android.useAndroidX=true