Merge "Unpin staledataclass-annotation-processor from Java 8"

This commit is contained in:
Sorin Basca
2022-09-28 19:00:34 +00:00
committed by Gerrit Code Review
4 changed files with 24 additions and 11 deletions

View File

@@ -289,6 +289,14 @@ java_defaults {
"staledataclass-annotation-processor", "staledataclass-annotation-processor",
"error_prone_android_framework", "error_prone_android_framework",
], ],
// Exports needed for staledataclass-annotation-processor, see b/139342589.
javacflags: [
"-J--add-modules=jdk.compiler",
"-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
"-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED",
"-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
"-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
],
required: [ required: [
// TODO(b/120066492): remove default_television.xml when the build system // TODO(b/120066492): remove default_television.xml when the build system
// propagates "required" properly. // propagates "required" properly.

View File

@@ -24,6 +24,14 @@ android_test {
plugins: [ plugins: [
"staledataclass-annotation-processor", "staledataclass-annotation-processor",
], ],
// Exports needed for staledataclass-annotation-processor, see b/139342589.
javacflags: [
"-J--add-modules=jdk.compiler",
"-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
"-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED",
"-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
"-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
],
static_libs: [ static_libs: [
"junit", "junit",
"hamcrest", "hamcrest",

View File

@@ -22,17 +22,13 @@ java_plugin {
static_libs: [ static_libs: [
"codegen-version-info", "codegen-version-info",
], ],
// The --add-modules/exports flags below don't work for kotlinc yet, so pin this module to Java language level 8 (see b/139342589): javacflags: [
java_version: "1.8", "--add-modules=jdk.compiler",
openjdk9: { "--add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
javacflags: [ "--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED",
"--add-modules=jdk.compiler", "--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
"--add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", "--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
"--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", ],
"--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
"--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
],
},
use_tools_jar: true, use_tools_jar: true,
} }

View File

@@ -14,6 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
@file:Suppress("JAVA_MODULE_DOES_NOT_EXPORT_PACKAGE")
package android.processor.staledataclass package android.processor.staledataclass