1package {
2    // See: http://go/android-license-faq
3    // A large-scale-change added 'default_applicable_licenses' to import
4    // all of the 'license_kinds' from "frameworks_base_license"
5    // to get the below license kinds:
6    //   SPDX-license-identifier-Apache-2.0
7    default_applicable_licenses: ["frameworks_base_license"],
8}
9
10android_test {
11    name: "CodegenTests",
12    srcs: [
13        "**/*.java",
14    ],
15
16    platform_apis: true,
17    test_suites: ["device-tests"],
18    certificate: "platform",
19
20    optimize: {
21        enabled: false,
22    },
23
24    plugins: [
25        "staledataclass-annotation-processor",
26    ],
27    // Exports needed for staledataclass-annotation-processor, see b/139342589.
28    javacflags: [
29        "-J--add-modules=jdk.compiler",
30        "-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
31        "-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED",
32        "-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
33        "-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
34    ],
35    static_libs: [
36        "junit",
37        "hamcrest",
38        "hamcrest-library",
39        "androidx.test.runner",
40        "androidx.test.rules",
41    ],
42}
43