diff --git a/android/guava-testlib/pom.xml b/android/guava-testlib/pom.xml index 9ebeb7da6090..a54de1641d11 100644 --- a/android/guava-testlib/pom.xml +++ b/android/guava-testlib/pom.xml @@ -71,6 +71,45 @@ maven-compiler-plugin + + + default-compile + + + -XDignore.symbol.file + + + + + compile-java9 + compile + + compile + + + 9 + + ${project.basedir}/src + + + + + -sourcepath + ${project.basedir}/src + --add-reads=com.google.common=ALL-UNNAMED + --add-reads=com.google.common.testlib=ALL-UNNAMED + + -XDcompilePolicy=simple + -Xlint:-removal + -Xlint:-options + + true + + + maven-source-plugin diff --git a/android/guava/pom.xml b/android/guava/pom.xml index 371a648852d6..442352e33dc9 100644 --- a/android/guava/pom.xml +++ b/android/guava/pom.xml @@ -62,13 +62,6 @@ maven-jar-plugin - - - - com.google.common - - - true @@ -86,9 +79,12 @@ + + <_fixupmessages>^Classes found in the wrong directory: .* !com.google.common.base.internal, !com.google.common.util.concurrent.internal, + !META-INF.*, com.google.common.* @@ -103,6 +99,42 @@ maven-compiler-plugin + + + default-compile + + + -XDignore.symbol.file + + + + + compile-java9 + compile + + compile + + + 9 + + ${project.basedir}/src + + + + + -sourcepath + ${project.basedir}/src + --add-reads=com.google.common=ALL-UNNAMED + + -XDcompilePolicy=simple + + true + + + maven-source-plugin diff --git a/android/pom.xml b/android/pom.xml index bf1c998be9fe..edddece5dbb1 100644 --- a/android/pom.xml +++ b/android/pom.xml @@ -145,15 +145,7 @@ 1.8 UTF-8 true - - - -sourcepath - doesnotexist + -XDcompilePolicy=simple --should-stop=ifError=FLOW @@ -181,6 +173,7 @@ -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED + -Xlint:-removal,-options @@ -192,6 +185,35 @@ true + + + default-compile + + 1.8 + 1.8 + + module-info.java + + + + -sourcepath + doesnotexist + + + + + default-testCompile + + + -Xlint:-removal + + + + maven-dependency-plugin @@ -211,7 +233,20 @@ maven-jar-plugin - 3.2.0 + 3.4.0 + + + + /module-info.class + + META-INF/versions/9/com/**/*.class + + + + true + + + maven-javadoc-plugin diff --git a/guava-gwt/pom.xml b/guava-gwt/pom.xml index f022d974d637..db9b0fedca72 100644 --- a/guava-gwt/pom.xml +++ b/guava-gwt/pom.xml @@ -134,15 +134,20 @@ maven-compiler-plugin - - - - - - **/ForceGuavaCompilation* - **/DummyJavadocClass* - - + + + default-compile + + + + + + **/ForceGuavaCompilation* + **/DummyJavadocClass* + + + + maven-jar-plugin diff --git a/guava-testlib/pom.xml b/guava-testlib/pom.xml index 52795e5914ac..8fe4208cc7f9 100644 --- a/guava-testlib/pom.xml +++ b/guava-testlib/pom.xml @@ -71,6 +71,45 @@ maven-compiler-plugin + + + default-compile + + + -XDignore.symbol.file + + + + + compile-java9 + compile + + compile + + + 9 + + ${project.basedir}/src + + + + + -sourcepath + ${project.basedir}/src + --add-reads=com.google.common=ALL-UNNAMED + --add-reads=com.google.common.testlib=ALL-UNNAMED + + -XDcompilePolicy=simple + -Xlint:-removal + -Xlint:-options + + true + + + maven-source-plugin diff --git a/guava-testlib/src/module-info.java b/guava-testlib/src/module-info.java new file mode 100644 index 000000000000..15668e35e9f3 --- /dev/null +++ b/guava-testlib/src/module-info.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2024 The Guava Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +/** Guava Testlib */ +module com.google.common.testlib { + requires java.logging; + requires com.google.common; + requires com.google.common.util.concurrent.internal; + + exports com.google.common.collect.testing; + exports com.google.common.collect.testing.features; + exports com.google.common.collect.testing.google; + exports com.google.common.collect.testing.testers; + exports com.google.common.escape.testing; + exports com.google.common.testing; + exports com.google.common.util.concurrent.testing; +} diff --git a/guava/pom.xml b/guava/pom.xml index 7249fd404250..9bce9492c291 100644 --- a/guava/pom.xml +++ b/guava/pom.xml @@ -62,13 +62,6 @@ maven-jar-plugin - - - - com.google.common - - - true @@ -86,9 +79,12 @@ + + <_fixupmessages>^Classes found in the wrong directory: .* !com.google.common.base.internal, !com.google.common.util.concurrent.internal, + !META-INF.*, com.google.common.* @@ -103,6 +99,42 @@ maven-compiler-plugin + + + default-compile + + + -XDignore.symbol.file + + + + + compile-java9 + compile + + compile + + + 9 + + ${project.basedir}/src + + + + + -sourcepath + ${project.basedir}/src + --add-reads=com.google.common=ALL-UNNAMED + + -XDcompilePolicy=simple + + true + + + maven-source-plugin diff --git a/guava/src/module-info.java b/guava/src/module-info.java new file mode 100644 index 000000000000..17bcd9382e62 --- /dev/null +++ b/guava/src/module-info.java @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2008 The Guava Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** Google Guava */ +module com.google.common { + requires static jdk.unsupported; + requires java.logging; + requires com.google.common.util.concurrent.internal; + + exports com.google.common.annotations; + exports com.google.common.base; + exports com.google.common.cache; + exports com.google.common.collect; + exports com.google.common.escape; + exports com.google.common.eventbus; + exports com.google.common.graph; + exports com.google.common.hash; + exports com.google.common.html; + exports com.google.common.io; + exports com.google.common.math; + exports com.google.common.net; + exports com.google.common.primitives; + exports com.google.common.reflect; + exports com.google.common.util.concurrent; + exports com.google.common.xml; +} diff --git a/pom.xml b/pom.xml index 3103cc41b240..cd6739f5a841 100644 --- a/pom.xml +++ b/pom.xml @@ -146,15 +146,7 @@ 1.8 UTF-8 true - - - -sourcepath - doesnotexist + -XDcompilePolicy=simple --should-stop=ifError=FLOW @@ -182,6 +174,7 @@ -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED + -Xlint:-removal,-options @@ -193,6 +186,35 @@ true + + + default-compile + + 1.8 + 1.8 + + module-info.java + + + + -sourcepath + doesnotexist + + + + + default-testCompile + + + -Xlint:-removal + + + + maven-dependency-plugin @@ -212,7 +234,20 @@ maven-jar-plugin - 3.2.0 + 3.4.0 + + + + /module-info.class + + META-INF/versions/9/com/**/*.class + + + + true + + + maven-javadoc-plugin