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