Makoto Onuki | 3aefe33 | 2023-10-06 10:02:07 -0700 | [diff] [blame] | 1 | package { |
| 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 | |
| 10 | filegroup { |
| 11 | name: "ravenwood-annotations", |
| 12 | srcs: [ |
| 13 | "annotations-src/**/*.java", |
| 14 | ], |
Anton Hansson | d82cbc7 | 2023-10-30 20:00:39 +0000 | [diff] [blame] | 15 | path: "annotations-src", |
Makoto Onuki | 3aefe33 | 2023-10-06 10:02:07 -0700 | [diff] [blame] | 16 | visibility: ["//visibility:public"], |
| 17 | } |
| 18 | |
Makoto Onuki | dfade84 | 2024-05-02 15:42:08 -0700 | [diff] [blame] | 19 | filegroup { |
| 20 | name: "ravenwood-services-policies", |
| 21 | srcs: [ |
| 22 | "texts/ravenwood-services-policies.txt", |
| 23 | ], |
| 24 | visibility: ["//visibility:public"], |
| 25 | } |
| 26 | |
| 27 | filegroup { |
| 28 | name: "ravenwood-framework-policies", |
| 29 | srcs: [ |
| 30 | "texts/ravenwood-framework-policies.txt", |
| 31 | ], |
| 32 | visibility: ["//visibility:public"], |
| 33 | } |
| 34 | |
| 35 | filegroup { |
| 36 | name: "ravenwood-standard-options", |
| 37 | srcs: [ |
| 38 | "texts/ravenwood-standard-options.txt", |
| 39 | ], |
| 40 | visibility: ["//visibility:public"], |
| 41 | } |
| 42 | |
| 43 | filegroup { |
| 44 | name: "ravenwood-annotation-allowed-classes", |
| 45 | srcs: [ |
| 46 | "texts/ravenwood-annotation-allowed-classes.txt", |
| 47 | ], |
| 48 | visibility: ["//visibility:public"], |
| 49 | } |
| 50 | |
Makoto Onuki | 3aefe33 | 2023-10-06 10:02:07 -0700 | [diff] [blame] | 51 | java_library { |
| 52 | name: "ravenwood-annotations-lib", |
| 53 | srcs: [":ravenwood-annotations"], |
| 54 | sdk_version: "core_current", |
| 55 | host_supported: true, |
| 56 | visibility: ["//visibility:public"], |
| 57 | } |
Jeff Sharkey | 91f414e | 2023-11-07 15:43:59 -0700 | [diff] [blame] | 58 | |
Makoto Onuki | 5b1f700 | 2024-05-16 15:44:38 -0700 | [diff] [blame^] | 59 | java_library { |
| 60 | name: "ravenwood-runtime-common", |
| 61 | host_supported: true, |
| 62 | sdk_version: "core_current", |
| 63 | srcs: [ |
| 64 | "runtime-common-src/**/*.java", |
| 65 | ], |
| 66 | visibility: ["//visibility:private"], |
| 67 | } |
| 68 | |
Makoto Onuki | 053eac8 | 2024-02-13 10:31:18 -0800 | [diff] [blame] | 69 | java_library_host { |
| 70 | name: "ravenwood-helper-libcore-runtime.host", |
| 71 | srcs: [ |
| 72 | "runtime-helper-src/libcore-fake/**/*.java", |
| 73 | ], |
Makoto Onuki | 5b1f700 | 2024-05-16 15:44:38 -0700 | [diff] [blame^] | 74 | static_libs: [ |
| 75 | "ravenwood-runtime-common", |
| 76 | ], |
Makoto Onuki | 053eac8 | 2024-02-13 10:31:18 -0800 | [diff] [blame] | 77 | visibility: ["//visibility:private"], |
| 78 | } |
| 79 | |
| 80 | java_host_for_device { |
| 81 | name: "ravenwood-helper-libcore-runtime", |
| 82 | libs: [ |
| 83 | "ravenwood-helper-libcore-runtime.host", |
| 84 | ], |
| 85 | visibility: ["//visibility:private"], |
| 86 | } |
| 87 | |
| 88 | java_library { |
| 89 | name: "ravenwood-helper-framework-runtime", |
| 90 | srcs: [ |
| 91 | "runtime-helper-src/framework/**/*.java", |
| 92 | ], |
Makoto Onuki | 5b1f700 | 2024-05-16 15:44:38 -0700 | [diff] [blame^] | 93 | static_libs: [ |
| 94 | "ravenwood-runtime-common", |
| 95 | ], |
Makoto Onuki | 053eac8 | 2024-02-13 10:31:18 -0800 | [diff] [blame] | 96 | libs: [ |
| 97 | "framework-minus-apex.ravenwood", |
Makoto Onuki | 50276f0 | 2024-02-13 14:58:56 -0800 | [diff] [blame] | 98 | "ravenwood-junit", |
Makoto Onuki | 053eac8 | 2024-02-13 10:31:18 -0800 | [diff] [blame] | 99 | ], |
| 100 | visibility: ["//visibility:private"], |
| 101 | } |
| 102 | |
| 103 | // Combine ravenwood-helper-*-runtime and create a single library, which we include |
| 104 | // in the ravenwood runtime. |
| 105 | // We do it this way rather than including the individual jars in the runtime, because |
| 106 | // for some reason we couldn't include a java_host_for_device module in the ravenwood runtime. |
| 107 | java_library { |
| 108 | name: "ravenwood-helper-runtime", |
| 109 | defaults: ["ravenwood-internal-only-visibility-java"], |
| 110 | static_libs: [ |
| 111 | "ravenwood-helper-framework-runtime", |
| 112 | "ravenwood-helper-libcore-runtime", |
| 113 | ], |
| 114 | } |
| 115 | |
Jeff Sharkey | 91f414e | 2023-11-07 15:43:59 -0700 | [diff] [blame] | 116 | java_library { |
Jeff Sharkey | 41cfbb3 | 2023-11-16 09:26:28 -0700 | [diff] [blame] | 117 | name: "ravenwood-junit-impl", |
| 118 | srcs: [ |
| 119 | "junit-src/**/*.java", |
| 120 | "junit-impl-src/**/*.java", |
| 121 | ], |
Jeff Sharkey | c91451a | 2024-01-29 10:55:45 -0700 | [diff] [blame] | 122 | static_libs: [ |
| 123 | "androidx.test.monitor-for-device", |
Makoto Onuki | 5b1f700 | 2024-05-16 15:44:38 -0700 | [diff] [blame^] | 124 | "ravenwood-runtime-common", |
Jeff Sharkey | c91451a | 2024-01-29 10:55:45 -0700 | [diff] [blame] | 125 | ], |
Jeff Sharkey | 91f414e | 2023-11-07 15:43:59 -0700 | [diff] [blame] | 126 | libs: [ |
Jeff Sharkey | 3e91c2b | 2024-02-15 14:12:07 -0700 | [diff] [blame] | 127 | "android.test.mock", |
Jeff Sharkey | 5e210d7 | 2023-11-10 11:22:05 -0700 | [diff] [blame] | 128 | "framework-minus-apex.ravenwood", |
Jeff Sharkey | 8a922ec | 2024-02-27 12:36:36 -0700 | [diff] [blame] | 129 | "ravenwood-framework", |
Jeff Sharkey | 3e91c2b | 2024-02-15 14:12:07 -0700 | [diff] [blame] | 130 | "services.core.ravenwood", |
Jeff Sharkey | 91f414e | 2023-11-07 15:43:59 -0700 | [diff] [blame] | 131 | "junit", |
| 132 | ], |
Makoto Onuki | a8bcba1 | 2023-11-22 14:00:24 -0800 | [diff] [blame] | 133 | sdk_version: "core_current", |
Jeff Sharkey | 41cfbb3 | 2023-11-16 09:26:28 -0700 | [diff] [blame] | 134 | visibility: ["//frameworks/base"], |
Jeff Sharkey | 3e91c2b | 2024-02-15 14:12:07 -0700 | [diff] [blame] | 135 | jarjar_rules: ":ravenwood-services-jarjar-rules", |
Jeff Sharkey | 41cfbb3 | 2023-11-16 09:26:28 -0700 | [diff] [blame] | 136 | } |
| 137 | |
Jeff Sharkey | 7037e35 | 2024-02-27 14:22:24 -0700 | [diff] [blame] | 138 | // Separated out from ravenwood-junit-impl since it needs to compile |
| 139 | // against `module_current` |
| 140 | java_library { |
| 141 | name: "ravenwood-junit-impl-flag", |
| 142 | srcs: [ |
| 143 | "junit-flag-src/**/*.java", |
| 144 | ], |
| 145 | sdk_version: "module_current", |
| 146 | libs: [ |
| 147 | "junit", |
| 148 | "flag-junit", |
| 149 | ], |
| 150 | visibility: ["//visibility:public"], |
| 151 | } |
| 152 | |
Jeff Sharkey | 41cfbb3 | 2023-11-16 09:26:28 -0700 | [diff] [blame] | 153 | // Carefully compiles against only test_current to support tests that |
| 154 | // want to verify they're unbundled. The "impl" library above is what |
| 155 | // ships inside the Ravenwood environment to actually drive any API |
| 156 | // access to implementation details. |
| 157 | java_library { |
| 158 | name: "ravenwood-junit", |
| 159 | srcs: [ |
| 160 | "junit-src/**/*.java", |
| 161 | "junit-stub-src/**/*.java", |
Jeff Sharkey | 7037e35 | 2024-02-27 14:22:24 -0700 | [diff] [blame] | 162 | "junit-flag-src/**/*.java", |
Jeff Sharkey | 41cfbb3 | 2023-11-16 09:26:28 -0700 | [diff] [blame] | 163 | ], |
| 164 | sdk_version: "test_current", |
Makoto Onuki | 5b1f700 | 2024-05-16 15:44:38 -0700 | [diff] [blame^] | 165 | static_libs: [ |
| 166 | "ravenwood-runtime-common", |
| 167 | ], |
Jeff Sharkey | 41cfbb3 | 2023-11-16 09:26:28 -0700 | [diff] [blame] | 168 | libs: [ |
| 169 | "junit", |
Jeff Sharkey | 7037e35 | 2024-02-27 14:22:24 -0700 | [diff] [blame] | 170 | "flag-junit", |
Jeff Sharkey | 41cfbb3 | 2023-11-16 09:26:28 -0700 | [diff] [blame] | 171 | ], |
Jeff Sharkey | 91f414e | 2023-11-07 15:43:59 -0700 | [diff] [blame] | 172 | visibility: ["//visibility:public"], |
| 173 | } |
Jeff Sharkey | 4ee8a65 | 2023-11-14 08:45:56 -0700 | [diff] [blame] | 174 | |
Jeff Sharkey | 8a922ec | 2024-02-27 12:36:36 -0700 | [diff] [blame] | 175 | // Library used to publish a handful of `android.ravenwood` APIs into |
| 176 | // the Ravenwood BCP; we don't want to publish these APIs into the BCP |
| 177 | // on physical devices, which is why this is a separate library |
| 178 | java_library { |
| 179 | name: "ravenwood-framework", |
| 180 | srcs: [ |
| 181 | "framework-src/**/*.java", |
| 182 | ], |
| 183 | libs: [ |
| 184 | "framework-minus-apex.ravenwood", |
| 185 | ], |
| 186 | sdk_version: "core_current", |
| 187 | visibility: ["//visibility:public"], |
| 188 | } |
| 189 | |
Jeff Sharkey | c91451a | 2024-01-29 10:55:45 -0700 | [diff] [blame] | 190 | java_host_for_device { |
| 191 | name: "androidx.test.monitor-for-device", |
| 192 | libs: [ |
| 193 | "androidx.test.monitor-for-host", |
| 194 | ], |
| 195 | } |
| 196 | |
| 197 | java_device_for_host { |
| 198 | name: "androidx.test.monitor-for-host", |
| 199 | libs: [ |
| 200 | "androidx.test.monitor", |
| 201 | ], |
| 202 | } |
Jeff Sharkey | 3e91c2b | 2024-02-15 14:12:07 -0700 | [diff] [blame] | 203 | |
| 204 | filegroup { |
| 205 | name: "ravenwood-services-jarjar-rules", |
Makoto Onuki | a3fe562 | 2024-03-27 13:08:32 -0700 | [diff] [blame] | 206 | srcs: ["texts/ravenwood-services-jarjar-rules.txt"], |
Jeff Sharkey | 3e91c2b | 2024-02-15 14:12:07 -0700 | [diff] [blame] | 207 | visibility: ["//frameworks/base"], |
| 208 | } |
Makoto Onuki | 3fb1f2b | 2024-03-27 13:08:32 -0700 | [diff] [blame] | 209 | |
Makoto Onuki | aedf30b | 2024-05-01 11:16:50 -0700 | [diff] [blame] | 210 | cc_library_shared { |
| 211 | name: "libravenwood_runtime", |
| 212 | host_supported: true, |
| 213 | |
| 214 | cflags: [ |
| 215 | "-Wall", |
| 216 | "-Werror", |
| 217 | "-Wno-unused-parameter", |
| 218 | "-Wthread-safety", |
| 219 | ], |
| 220 | |
| 221 | srcs: [ |
Makoto Onuki | 5b1f700 | 2024-05-16 15:44:38 -0700 | [diff] [blame^] | 222 | "runtime-jni/*.cpp", |
Makoto Onuki | aedf30b | 2024-05-01 11:16:50 -0700 | [diff] [blame] | 223 | ], |
| 224 | |
| 225 | shared_libs: [ |
| 226 | "libbase", |
| 227 | "liblog", |
| 228 | "libnativehelper", |
| 229 | "libutils", |
| 230 | "libcutils", |
| 231 | ], |
| 232 | visibility: ["//frameworks/base"], |
| 233 | } |
| 234 | |
Makoto Onuki | 3fb1f2b | 2024-03-27 13:08:32 -0700 | [diff] [blame] | 235 | // For collecting the *stats.csv files in a known directory under out/host/linux-x86/testcases/. |
| 236 | // The "test" just shows the available stats filenames. |
| 237 | sh_test_host { |
| 238 | name: "ravenwood-stats-checker", |
Makoto Onuki | a3fe562 | 2024-03-27 13:08:32 -0700 | [diff] [blame] | 239 | src: "scripts/ravenwood-stats-checker.sh", |
Makoto Onuki | 3fb1f2b | 2024-03-27 13:08:32 -0700 | [diff] [blame] | 240 | test_suites: ["general-tests"], |
| 241 | data: [ |
| 242 | ":framework-minus-apex.ravenwood.stats", |
Makoto Onuki | 434d7282 | 2024-04-25 11:03:41 -0700 | [diff] [blame] | 243 | ":framework-minus-apex.ravenwood.apis", |
Makoto Onuki | e6ee022 | 2024-05-14 10:26:07 -0700 | [diff] [blame] | 244 | ":framework-minus-apex.ravenwood.keep_all", |
Makoto Onuki | 3fb1f2b | 2024-03-27 13:08:32 -0700 | [diff] [blame] | 245 | ":services.core.ravenwood.stats", |
Makoto Onuki | 434d7282 | 2024-04-25 11:03:41 -0700 | [diff] [blame] | 246 | ":services.core.ravenwood.apis", |
Makoto Onuki | e6ee022 | 2024-05-14 10:26:07 -0700 | [diff] [blame] | 247 | ":services.core.ravenwood.keep_all", |
Makoto Onuki | 3fb1f2b | 2024-03-27 13:08:32 -0700 | [diff] [blame] | 248 | ], |
| 249 | } |