xref: /aosp_15_r20/external/robolectric/sandbox/Android.bp (revision e6ba16074e6af37d123cb567d575f496bf0a58ee)
1*e6ba1607SAndroid Build Coastguard Worker//#############################################
2*e6ba1607SAndroid Build Coastguard Worker// Compile Robolectric sandbox
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_host {
15*e6ba1607SAndroid Build Coastguard Worker    name: "Robolectric_sandbox_upstream",
16*e6ba1607SAndroid Build Coastguard Worker    srcs: ["src/main/java/**/*.java"],
17*e6ba1607SAndroid Build Coastguard Worker    libs: [
18*e6ba1607SAndroid Build Coastguard Worker        "Robolectric_annotations_upstream",
19*e6ba1607SAndroid Build Coastguard Worker        "Robolectric_shadowapi_upstream",
20*e6ba1607SAndroid Build Coastguard Worker        "Robolectric_utils_reflector_upstream",
21*e6ba1607SAndroid Build Coastguard Worker        "Robolectric_utils_upstream",
22*e6ba1607SAndroid Build Coastguard Worker        "asm-commons-9.6",
23*e6ba1607SAndroid Build Coastguard Worker        "guava",
24*e6ba1607SAndroid Build Coastguard Worker        "asm-tree-9.6",
25*e6ba1607SAndroid Build Coastguard Worker        "asm-9.6",
26*e6ba1607SAndroid Build Coastguard Worker        "jsr305",
27*e6ba1607SAndroid Build Coastguard Worker    ],
28*e6ba1607SAndroid Build Coastguard Worker    plugins: [
29*e6ba1607SAndroid Build Coastguard Worker        "auto_service_plugin",
30*e6ba1607SAndroid Build Coastguard Worker        "auto_value_plugin",
31*e6ba1607SAndroid Build Coastguard Worker    ],
32*e6ba1607SAndroid Build Coastguard Worker    openjdk9: {
33*e6ba1607SAndroid Build Coastguard Worker        javacflags: [
34*e6ba1607SAndroid Build Coastguard Worker            "--add-opens=java.base/java.lang=ALL-UNNAMED",
35*e6ba1607SAndroid Build Coastguard Worker        ],
36*e6ba1607SAndroid Build Coastguard Worker    },
37*e6ba1607SAndroid Build Coastguard Worker}
38*e6ba1607SAndroid Build Coastguard Worker
39*e6ba1607SAndroid Build Coastguard Worker//#############################################
40*e6ba1607SAndroid Build Coastguard Worker// Compile Robolectric sandbox tests
41*e6ba1607SAndroid Build Coastguard Worker//#############################################
42*e6ba1607SAndroid Build Coastguard Worker
43*e6ba1607SAndroid Build Coastguard Workerjava_test_host {
44*e6ba1607SAndroid Build Coastguard Worker    name: "Robolectric_sandbox_tests_upstream",
45*e6ba1607SAndroid Build Coastguard Worker    srcs: ["src/test/java/**/*.java"],
46*e6ba1607SAndroid Build Coastguard Worker    static_libs: [
47*e6ba1607SAndroid Build Coastguard Worker        "Robolectric_annotations_upstream",
48*e6ba1607SAndroid Build Coastguard Worker        "Robolectric_shadowapi_upstream",
49*e6ba1607SAndroid Build Coastguard Worker        "Robolectric_sandbox_upstream",
50*e6ba1607SAndroid Build Coastguard Worker        "Robolectric_utils_reflector_upstream",
51*e6ba1607SAndroid Build Coastguard Worker        "Robolectric_utils_upstream",
52*e6ba1607SAndroid Build Coastguard Worker        "Robolectric_junit_upstream",
53*e6ba1607SAndroid Build Coastguard Worker        "mockito",
54*e6ba1607SAndroid Build Coastguard Worker        "hamcrest",
55*e6ba1607SAndroid Build Coastguard Worker        "asm-commons-9.6",
56*e6ba1607SAndroid Build Coastguard Worker        "guava",
57*e6ba1607SAndroid Build Coastguard Worker        "objenesis",
58*e6ba1607SAndroid Build Coastguard Worker        "asm-tree-9.6",
59*e6ba1607SAndroid Build Coastguard Worker        "junit",
60*e6ba1607SAndroid Build Coastguard Worker        "truth",
61*e6ba1607SAndroid Build Coastguard Worker        "asm-9.6",
62*e6ba1607SAndroid Build Coastguard Worker        "jsr305",
63*e6ba1607SAndroid Build Coastguard Worker    ],
64*e6ba1607SAndroid Build Coastguard Worker    plugins: [
65*e6ba1607SAndroid Build Coastguard Worker        "auto_service_plugin",
66*e6ba1607SAndroid Build Coastguard Worker        "auto_value_plugin",
67*e6ba1607SAndroid Build Coastguard Worker    ],
68*e6ba1607SAndroid Build Coastguard Worker    test_suites: ["general-tests"],
69*e6ba1607SAndroid Build Coastguard Worker}
70