blob: f4337d41aead67623e2c5aeded5ee429cd3f4a1c [file] [log] [blame]
Makoto Onuki3aefe332023-10-06 10:02:07 -07001package {
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
10filegroup {
11 name: "ravenwood-annotations",
12 srcs: [
13 "annotations-src/**/*.java",
14 ],
Anton Hanssond82cbc72023-10-30 20:00:39 +000015 path: "annotations-src",
Makoto Onuki3aefe332023-10-06 10:02:07 -070016 visibility: ["//visibility:public"],
17}
18
Makoto Onuki3aefe332023-10-06 10:02:07 -070019java_library {
20 name: "ravenwood-annotations-lib",
21 srcs: [":ravenwood-annotations"],
22 sdk_version: "core_current",
23 host_supported: true,
24 visibility: ["//visibility:public"],
25}
Jeff Sharkey91f414e2023-11-07 15:43:59 -070026
Makoto Onuki053eac82024-02-13 10:31:18 -080027java_library_host {
28 name: "ravenwood-helper-libcore-runtime.host",
29 srcs: [
30 "runtime-helper-src/libcore-fake/**/*.java",
31 ],
32 visibility: ["//visibility:private"],
33}
34
35java_host_for_device {
36 name: "ravenwood-helper-libcore-runtime",
37 libs: [
38 "ravenwood-helper-libcore-runtime.host",
39 ],
40 visibility: ["//visibility:private"],
41}
42
43java_library {
44 name: "ravenwood-helper-framework-runtime",
45 srcs: [
46 "runtime-helper-src/framework/**/*.java",
47 ],
48 libs: [
49 "framework-minus-apex.ravenwood",
Makoto Onuki50276f02024-02-13 14:58:56 -080050 "ravenwood-junit",
Makoto Onuki053eac82024-02-13 10:31:18 -080051 ],
52 visibility: ["//visibility:private"],
53}
54
55// Combine ravenwood-helper-*-runtime and create a single library, which we include
56// in the ravenwood runtime.
57// We do it this way rather than including the individual jars in the runtime, because
58// for some reason we couldn't include a java_host_for_device module in the ravenwood runtime.
59java_library {
60 name: "ravenwood-helper-runtime",
61 defaults: ["ravenwood-internal-only-visibility-java"],
62 static_libs: [
63 "ravenwood-helper-framework-runtime",
64 "ravenwood-helper-libcore-runtime",
65 ],
66}
67
Jeff Sharkey91f414e2023-11-07 15:43:59 -070068java_library {
Jeff Sharkey41cfbb32023-11-16 09:26:28 -070069 name: "ravenwood-junit-impl",
70 srcs: [
71 "junit-src/**/*.java",
72 "junit-impl-src/**/*.java",
73 ],
Jeff Sharkeyc91451a2024-01-29 10:55:45 -070074 static_libs: [
75 "androidx.test.monitor-for-device",
76 ],
Jeff Sharkey91f414e2023-11-07 15:43:59 -070077 libs: [
Jeff Sharkey3e91c2b2024-02-15 14:12:07 -070078 "android.test.mock",
Jeff Sharkey5e210d72023-11-10 11:22:05 -070079 "framework-minus-apex.ravenwood",
Jeff Sharkey8a922ec2024-02-27 12:36:36 -070080 "ravenwood-framework",
Jeff Sharkey3e91c2b2024-02-15 14:12:07 -070081 "services.core.ravenwood",
Jeff Sharkey91f414e2023-11-07 15:43:59 -070082 "junit",
83 ],
Makoto Onukia8bcba12023-11-22 14:00:24 -080084 sdk_version: "core_current",
Jeff Sharkey41cfbb32023-11-16 09:26:28 -070085 visibility: ["//frameworks/base"],
Jeff Sharkey3e91c2b2024-02-15 14:12:07 -070086 jarjar_rules: ":ravenwood-services-jarjar-rules",
Jeff Sharkey41cfbb32023-11-16 09:26:28 -070087}
88
Jeff Sharkey7037e352024-02-27 14:22:24 -070089// Separated out from ravenwood-junit-impl since it needs to compile
90// against `module_current`
91java_library {
92 name: "ravenwood-junit-impl-flag",
93 srcs: [
94 "junit-flag-src/**/*.java",
95 ],
96 sdk_version: "module_current",
97 libs: [
98 "junit",
99 "flag-junit",
100 ],
101 visibility: ["//visibility:public"],
102}
103
Jeff Sharkey41cfbb32023-11-16 09:26:28 -0700104// Carefully compiles against only test_current to support tests that
105// want to verify they're unbundled. The "impl" library above is what
106// ships inside the Ravenwood environment to actually drive any API
107// access to implementation details.
108java_library {
109 name: "ravenwood-junit",
110 srcs: [
111 "junit-src/**/*.java",
112 "junit-stub-src/**/*.java",
Jeff Sharkey7037e352024-02-27 14:22:24 -0700113 "junit-flag-src/**/*.java",
Jeff Sharkey41cfbb32023-11-16 09:26:28 -0700114 ],
115 sdk_version: "test_current",
116 libs: [
117 "junit",
Jeff Sharkey7037e352024-02-27 14:22:24 -0700118 "flag-junit",
Jeff Sharkey41cfbb32023-11-16 09:26:28 -0700119 ],
Jeff Sharkey91f414e2023-11-07 15:43:59 -0700120 visibility: ["//visibility:public"],
121}
Jeff Sharkey4ee8a652023-11-14 08:45:56 -0700122
Jeff Sharkey8a922ec2024-02-27 12:36:36 -0700123// Library used to publish a handful of `android.ravenwood` APIs into
124// the Ravenwood BCP; we don't want to publish these APIs into the BCP
125// on physical devices, which is why this is a separate library
126java_library {
127 name: "ravenwood-framework",
128 srcs: [
129 "framework-src/**/*.java",
130 ],
131 libs: [
132 "framework-minus-apex.ravenwood",
133 ],
134 sdk_version: "core_current",
135 visibility: ["//visibility:public"],
136}
137
Jeff Sharkeyc91451a2024-01-29 10:55:45 -0700138java_host_for_device {
139 name: "androidx.test.monitor-for-device",
140 libs: [
141 "androidx.test.monitor-for-host",
142 ],
143}
144
145java_device_for_host {
146 name: "androidx.test.monitor-for-host",
147 libs: [
148 "androidx.test.monitor",
149 ],
150}
Jeff Sharkey3e91c2b2024-02-15 14:12:07 -0700151
152filegroup {
153 name: "ravenwood-services-jarjar-rules",
154 srcs: ["ravenwood-services-jarjar-rules.txt"],
155 visibility: ["//frameworks/base"],
156}
Makoto Onuki3fb1f2b2024-03-27 13:08:32 -0700157
158// For collecting the *stats.csv files in a known directory under out/host/linux-x86/testcases/.
159// The "test" just shows the available stats filenames.
160sh_test_host {
161 name: "ravenwood-stats-checker",
162 src: "ravenwood-stats-checker.sh",
163 test_suites: ["general-tests"],
164 data: [
165 ":framework-minus-apex.ravenwood.stats",
166 ":services.core.ravenwood.stats",
167 ],
168}