From ec57bebf26f3114de053967d487f2c0fb7922ac8 Mon Sep 17 00:00:00 2001 From: Sam Gammon Date: Thu, 7 Mar 2024 17:00:45 -0800 Subject: [PATCH] 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 | 29 ++++++++++++++++++++++++++++- guava/pom.xml | 1 + pom.xml | 36 +++++++++++++++++++++++++++++++++++- 3 files changed, 64 insertions(+), 2 deletions(-) diff --git a/android/pom.xml b/android/pom.xml index 52837fa733d4..b21b930e1110 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} @@ -357,6 +358,19 @@ --no-module-directories + + + javadocs-jdk19plus + + [19,] + + + --enable-preview + + open-jre-modules @@ -462,5 +476,18 @@ + + javac-for-jvm18plus + + + [18,] + + + -Djava.security.manager=allow + + diff --git a/guava/pom.xml b/guava/pom.xml index 913fc387a619..77d6b25361db 100644 --- a/guava/pom.xml +++ b/guava/pom.xml @@ -199,6 +199,7 @@ https://errorprone.info/api/latest/ ../overview.html + ${maven-javadoc-plugin.additionalJOptions} diff --git a/pom.xml b/pom.xml index 79ecb39a58dc..641bc9721f19 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} @@ -352,6 +360,19 @@ --no-module-directories + + + javadocs-jdk19plus + + [19,] + + + --enable-preview + + open-jre-modules @@ -457,5 +478,18 @@ + + javac-for-jvm18plus + + + [18,] + + + -Djava.security.manager=allow + +