xref: /aosp_15_r20/external/robolectric/shadows/framework/Android.bp (revision e6ba16074e6af37d123cb567d575f496bf0a58ee)
1//#############################################
2// Compile Robolectric shadows framework
3//#############################################
4
5package {
6    // See: http://go/android-license-faq
7    // A large-scale-change added 'default_applicable_licenses' to import
8    // all of the 'license_kinds' from "external_robolectric_license"
9    // to get the below license kinds:
10    //   SPDX-license-identifier-Apache-2.0
11    default_applicable_licenses: ["external_robolectric_license"],
12}
13
14java_library {
15    name: "Robolectric_shadows_framework_upstream",
16    host_supported: true,
17    device_supported: false,
18    srcs: [
19        "src/main/java/**/*.java",
20        "src/main/java/**/*.kt",
21    ],
22    java_resource_dirs: ["src/main/resources"],
23    javacflags: [
24        "-Aorg.robolectric.annotation.processing.shadowPackage=org.robolectric",
25        "-Aorg.robolectric.annotation.processing.sdkCheckMode=ERROR",
26        "-Aorg.robolectric.annotation.processing.validateCompileSdk=true",
27        // Uncomment the below to debug annotation processors not firing.
28        //"-verbose",
29        //"-XprintRounds",
30        //"-XprintProcessorInfo",
31        //"-Xlint",
32        //"-J-verbose",
33    ],
34    libs: [
35        "Robolectric_annotations_upstream",
36        "Robolectric_nativeruntime_upstream",
37        "Robolectric_resources_upstream",
38        "Robolectric_pluginapi_upstream",
39        "Robolectric_sandbox_upstream",
40        "Robolectric_shadowapi_upstream",
41        "Robolectric_shadows_versioning_upstream",
42        "Robolectric_utils_upstream",
43        "Robolectric_utils_reflector_upstream",
44        "auto_value_annotations",
45        "jsr305",
46        "icu4j",
47        "robolectric-accessibility-test-framework-2.1",
48        "robolectric-javax.annotation-api-1.2",
49        "robolectric-sqlite4java-0.282",
50        "asm-commons-9.6",
51        "guava",
52        "asm-tree-9.6",
53        "asm-9.6",
54        //standard tools
55        "error_prone_annotations",
56        // aar files that make up android and jetpack
57        "robolectric-host-android_all",
58        "robolectric-host-androidx-test-core_upstream",
59        "robolectric-host-androidx-test-monitor_upstream",
60    ],
61    plugins: [
62        "auto_value_plugin_1.9",
63        "auto_value_builder_plugin_1.9",
64        "Robolectric_processor_upstream",
65    ],
66    errorprone: {
67        javacflags: [
68            "-Xep:ImpossibleNullComparison:WARN",
69        ],
70    },
71}
72