1package { 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 ], 15 path: "annotations-src", 16 visibility: ["//visibility:public"], 17} 18 19filegroup { 20 name: "ravenwood-services-policies", 21 srcs: [ 22 "texts/ravenwood-services-policies.txt", 23 ], 24 visibility: ["//visibility:public"], 25} 26 27filegroup { 28 name: "ravenwood-framework-policies", 29 srcs: [ 30 "texts/ravenwood-framework-policies.txt", 31 ], 32 visibility: ["//visibility:public"], 33} 34 35filegroup { 36 name: "ravenwood-standard-options", 37 srcs: [ 38 "texts/ravenwood-standard-options.txt", 39 ], 40 visibility: ["//visibility:public"], 41} 42 43filegroup { 44 name: "ravenwood-annotation-allowed-classes", 45 srcs: [ 46 "texts/ravenwood-annotation-allowed-classes.txt", 47 ], 48 visibility: ["//visibility:public"], 49} 50 51java_library { 52 name: "ravenwood-annotations-lib", 53 srcs: [":ravenwood-annotations"], 54 sdk_version: "core_current", 55 host_supported: true, 56 visibility: ["//visibility:public"], 57} 58 59// This and the next module contain the same classes with different implementations. 60// "ravenwood-runtime-common-device" will be statically linked in device side tests. 61// "ravenwood-runtime-common-ravenwood" will only exist in ravenwood-runtime, which will take 62// precedence even if the test jar (accidentally) contains "ravenwood-runtime-common-device". 63// "ravenwood-runtime-common" uses it to detect if the rutime is Ravenwood or not. 64java_library { 65 name: "ravenwood-runtime-common-ravenwood", 66 host_supported: true, 67 sdk_version: "core_current", 68 srcs: [ 69 "runtime-common-ravenwood-src/**/*.java", 70 ], 71 visibility: ["//frameworks/base"], 72} 73 74java_library { 75 name: "ravenwood-runtime-common-device", 76 host_supported: true, 77 sdk_version: "core_current", 78 srcs: [ 79 "runtime-common-device-src/**/*.java", 80 ], 81 visibility: ["//visibility:private"], 82} 83 84java_library { 85 name: "ravenwood-runtime-common", 86 host_supported: true, 87 sdk_version: "core_current", 88 srcs: [ 89 "runtime-common-src/**/*.java", 90 ], 91 libs: [ 92 "ravenwood-runtime-common-ravenwood", 93 ], 94 visibility: ["//visibility:private"], 95} 96 97java_library_host { 98 name: "ravenwood-helper-libcore-runtime.host", 99 srcs: [ 100 "runtime-helper-src/libcore-fake/**/*.java", 101 ], 102 static_libs: [ 103 "ravenwood-runtime-common", 104 ], 105 visibility: ["//visibility:private"], 106} 107 108java_host_for_device { 109 name: "ravenwood-helper-libcore-runtime", 110 libs: [ 111 "ravenwood-helper-libcore-runtime.host", 112 ], 113 visibility: ["//visibility:private"], 114} 115 116java_library { 117 name: "ravenwood-helper-framework-runtime", 118 srcs: [ 119 "runtime-helper-src/framework/**/*.java", 120 ], 121 static_libs: [ 122 "ravenwood-runtime-common", 123 ], 124 libs: [ 125 "framework-minus-apex.ravenwood", 126 "ravenwood-junit", 127 ], 128 visibility: ["//visibility:private"], 129} 130 131// Combine ravenwood-helper-*-runtime and create a single library, which we include 132// in the ravenwood runtime. 133// We do it this way rather than including the individual jars in the runtime, because 134// for some reason we couldn't include a java_host_for_device module in the ravenwood runtime. 135java_library { 136 name: "ravenwood-helper-runtime", 137 defaults: ["ravenwood-internal-only-visibility-java"], 138 static_libs: [ 139 "ravenwood-helper-framework-runtime", 140 "ravenwood-helper-libcore-runtime", 141 ], 142} 143 144java_library { 145 name: "ravenwood-junit-impl", 146 srcs: [ 147 "junit-src/**/*.java", 148 "junit-impl-src/**/*.java", 149 ], 150 static_libs: [ 151 "androidx.test.monitor-for-device", 152 "ravenwood-runtime-common", 153 ], 154 libs: [ 155 "android.test.mock", 156 "framework-minus-apex.ravenwood", 157 "ravenwood-framework", 158 "services.core.ravenwood", 159 "junit", 160 ], 161 sdk_version: "core_current", 162 visibility: ["//frameworks/base"], 163 jarjar_rules: ":ravenwood-services-jarjar-rules", 164} 165 166// Separated out from ravenwood-junit-impl since it needs to compile 167// against `module_current` 168java_library { 169 name: "ravenwood-junit-impl-flag", 170 srcs: [ 171 "junit-flag-src/**/*.java", 172 ], 173 sdk_version: "module_current", 174 libs: [ 175 "junit", 176 "flag-junit", 177 ], 178 visibility: ["//visibility:public"], 179} 180 181// Carefully compiles against only test_current to support tests that 182// want to verify they're unbundled. The "impl" library above is what 183// ships inside the Ravenwood environment to actually drive any API 184// access to implementation details. 185java_library { 186 name: "ravenwood-junit", 187 srcs: [ 188 "junit-src/**/*.java", 189 "junit-stub-src/**/*.java", 190 "junit-flag-src/**/*.java", 191 ], 192 sdk_version: "test_current", 193 static_libs: [ 194 "ravenwood-runtime-common", 195 "ravenwood-runtime-common-device", 196 ], 197 libs: [ 198 "junit", 199 "flag-junit", 200 ], 201 visibility: ["//visibility:public"], 202} 203 204// Library used to publish a handful of `android.ravenwood` APIs into 205// the Ravenwood BCP; we don't want to publish these APIs into the BCP 206// on physical devices, which is why this is a separate library 207java_library { 208 name: "ravenwood-framework", 209 srcs: [ 210 "framework-src/**/*.java", 211 ], 212 libs: [ 213 "framework-minus-apex.ravenwood", 214 ], 215 sdk_version: "core_current", 216 visibility: ["//visibility:public"], 217} 218 219java_host_for_device { 220 name: "androidx.test.monitor-for-device", 221 libs: [ 222 "androidx.test.monitor-for-host", 223 ], 224} 225 226java_device_for_host { 227 name: "androidx.test.monitor-for-host", 228 libs: [ 229 "androidx.test.monitor", 230 ], 231} 232 233filegroup { 234 name: "ravenwood-services-jarjar-rules", 235 srcs: ["texts/ravenwood-services-jarjar-rules.txt"], 236 visibility: ["//frameworks/base"], 237} 238 239cc_library_shared { 240 name: "libravenwood_runtime", 241 host_supported: true, 242 243 cflags: [ 244 "-Wall", 245 "-Werror", 246 "-Wno-unused-parameter", 247 "-Wthread-safety", 248 ], 249 250 srcs: [ 251 "runtime-jni/*.cpp", 252 ], 253 254 shared_libs: [ 255 "libbase", 256 "liblog", 257 "libnativehelper", 258 "libutils", 259 "libcutils", 260 ], 261 visibility: ["//frameworks/base"], 262} 263 264// For collecting the *stats.csv files in a known directory under out/host/linux-x86/testcases/. 265// The "test" just shows the available stats filenames. 266sh_test_host { 267 name: "ravenwood-stats-checker", 268 src: "scripts/ravenwood-stats-checker.sh", 269 test_suites: ["general-tests"], 270 data: [ 271 ":framework-minus-apex.ravenwood.stats", 272 ":framework-minus-apex.ravenwood.apis", 273 ":framework-minus-apex.ravenwood.keep_all", 274 ":services.core.ravenwood.stats", 275 ":services.core.ravenwood.apis", 276 ":services.core.ravenwood.keep_all", 277 ], 278} 279