Unpin staledataclass-annotation-processor from Java 8

Test: m
Fixes: 139342589
Change-Id: Ie4791425a4fcdf551ffa70b2c02ab3ed13e57eaa
This commit is contained in:
Sorin Basca 2022-09-27 18:02:06 +01:00
parent 96c760a013
commit 73cb9bdb19
4 changed files with 24 additions and 11 deletions

View File

@ -289,6 +289,14 @@ java_defaults {
"staledataclass-annotation-processor",
"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: [
// TODO(b/120066492): remove default_television.xml when the build system
// propagates "required" properly.

View File

@ -24,6 +24,14 @@ android_test {
plugins: [
"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: [
"junit",
"hamcrest",

View File

@ -22,17 +22,13 @@ java_plugin {
static_libs: [
"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):
java_version: "1.8",
openjdk9: {
javacflags: [
"--add-modules=jdk.compiler",
"--add-exports jdk.compiler/com.sun.tools.javac.code=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",
],
},
javacflags: [
"--add-modules=jdk.compiler",
"--add-exports jdk.compiler/com.sun.tools.javac.code=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,
}

View File

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