From 1324893eb0d0ee838483cc1df9daeaae1978d76c Mon Sep 17 00:00:00 2001 From: Sam Gammon Date: Thu, 7 Mar 2024 17:00:45 -0800 Subject: [PATCH 1/2] fix: build against jvm21 - fix: build against embedded jdk sources needs `--enable-preview` when built against jvm21 - fix: add `-Djava.security.manager=allow` to fix security manager tests under modern java Fixes and closes google/guava#7065 Signed-off-by: Sam Gammon --- android/pom.xml | 16 +++++++++++++++- pom.xml | 23 ++++++++++++++++++++++- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/android/pom.xml b/android/pom.xml index 230bc738a53d..8f2786bb17a5 100644 --- a/android/pom.xml +++ b/android/pom.xml @@ -25,6 +25,7 @@ 2024-01-02T00:00:00Z UTF-8 + integration android android @@ -253,7 +254,7 @@ alphabetical - -Xmx1536M -Duser.language=hi -Duser.country=IN ${test.add.opens} + -Xmx1536M -Duser.language=hi -Duser.country=IN ${test.add.args} ${test.add.opens} @@ -462,5 +463,18 @@ + + javac-for-jvm18plus + + + [18,] + + + -Djava.security.manager=allow + + diff --git a/pom.xml b/pom.xml index c7cdbb76aa99..1538734431cb 100644 --- a/pom.xml +++ b/pom.xml @@ -25,6 +25,7 @@ 2024-01-02T00:00:00Z UTF-8 + integration standard-jvm jre @@ -177,6 +178,13 @@ org.codehaus.mojo animal-sniffer-maven-plugin 1.23 + + + org.ow2.asm + asm + 9.6 + + com.google.common.base.IgnoreJRERequirement,com.google.common.collect.IgnoreJRERequirement,com.google.common.hash.IgnoreJRERequirement,com.google.common.io.IgnoreJRERequirement,com.google.common.reflect.IgnoreJRERequirement,com.google.common.testing.IgnoreJRERequirement true @@ -248,7 +256,7 @@ alphabetical - -Xmx1536M -Duser.language=hi -Duser.country=IN ${test.add.opens} + -Xmx1536M -Duser.language=hi -Duser.country=IN ${test.add.args} ${test.add.opens} @@ -457,5 +465,18 @@ + + javac-for-jvm18plus + + + [18,] + + + -Djava.security.manager=allow + + From cbd19eef3a700fb0695deaf5ed688cde46b3dae3 Mon Sep 17 00:00:00 2001 From: Sam Gammon Date: Thu, 7 Mar 2024 17:01:51 -0800 Subject: [PATCH 2/2] =?UTF-8?q?chore(ci):=20bump=20ci=20jdk=20=E2=86=92=20?= =?UTF-8?q?jdk21?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sam Gammon --- .github/workflows/ci.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5453d3a1df3..0fc561fbcd75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,11 +20,11 @@ jobs: strategy: matrix: os: [ ubuntu-latest ] - java: [ 8, 11, 17 ] + java: [ 8, 11, 17, 21 ] root-pom: [ 'pom.xml', 'android/pom.xml' ] include: - os: windows-latest - java: 17 + java: 21 root-pom: pom.xml runs-on: ${{ matrix.os }} env: @@ -68,11 +68,10 @@ jobs: steps: - name: 'Check out repository' uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - name: 'Set up JDK 11' + - name: 'Set up JDK 21' uses: actions/setup-java@9704b39bf258b59bc04b50fa2dd55e9ed76b47a8 # v4.1.0 - with: - java-version: 11 + java-version: 21 distribution: 'zulu' server-id: sonatype-nexus-snapshots server-username: CI_DEPLOY_USERNAME @@ -94,11 +93,10 @@ jobs: steps: - name: 'Check out repository' uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 - - name: 'Set up JDK 11' + - name: 'Set up JDK 21' uses: actions/setup-java@9704b39bf258b59bc04b50fa2dd55e9ed76b47a8 # v4.1.0 - with: - java-version: 11 + java-version: 21 distribution: 'zulu' cache: 'maven' - name: 'Generate latest docs'