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