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 | 053eac8 | 2024-02-13 10:31:18 -0800 | [diff] [blame] | 59 | java_library_host { |
| 60 | name: "ravenwood-helper-libcore-runtime.host", |
| 61 | srcs: [ |
| 62 | "runtime-helper-src/libcore-fake/**/*.java", |
| 63 | ], |
| 64 | visibility: ["//visibility:private"], |
| 65 | } |
| 66 | |
| 67 | java_host_for_device { |
| 68 | name: "ravenwood-helper-libcore-runtime", |
| 69 | libs: [ |
| 70 | "ravenwood-helper-libcore-runtime.host", |
| 71 | ], |
| 72 | visibility: ["//visibility:private"], |
| 73 | } |
| 74 | |
| 75 | java_library { |
| 76 | name: "ravenwood-helper-framework-runtime", |
| 77 | srcs: [ |
| 78 | "runtime-helper-src/framework/**/*.java", |
| 79 | ], |
| 80 | libs: [ |
| 81 | "framework-minus-apex.ravenwood", |
Makoto Onuki | 50276f0 | 2024-02-13 14:58:56 -0800 | [diff] [blame] | 82 | "ravenwood-junit", |
Makoto Onuki | 053eac8 | 2024-02-13 10:31:18 -0800 | [diff] [blame] | 83 | ], |
| 84 | visibility: ["//visibility:private"], |
| 85 | } |
| 86 | |
| 87 | // Combine ravenwood-helper-*-runtime and create a single library, which we include |
| 88 | // in the ravenwood runtime. |
| 89 | // We do it this way rather than including the individual jars in the runtime, because |
| 90 | // for some reason we couldn't include a java_host_for_device module in the ravenwood runtime. |
| 91 | java_library { |
| 92 | name: "ravenwood-helper-runtime", |
| 93 | defaults: ["ravenwood-internal-only-visibility-java"], |
| 94 | static_libs: [ |
| 95 | "ravenwood-helper-framework-runtime", |
| 96 | "ravenwood-helper-libcore-runtime", |
| 97 | ], |
| 98 | } |
| 99 | |
Jeff Sharkey | 91f414e | 2023-11-07 15:43:59 -0700 | [diff] [blame] | 100 | java_library { |
Jeff Sharkey | 41cfbb3 | 2023-11-16 09:26:28 -0700 | [diff] [blame] | 101 | name: "ravenwood-junit-impl", |
| 102 | srcs: [ |
| 103 | "junit-src/**/*.java", |
| 104 | "junit-impl-src/**/*.java", |
| 105 | ], |
Jeff Sharkey | c91451a | 2024-01-29 10:55:45 -0700 | [diff] [blame] | 106 | static_libs: [ |
| 107 | "androidx.test.monitor-for-device", |
| 108 | ], |
Jeff Sharkey | 91f414e | 2023-11-07 15:43:59 -0700 | [diff] [blame] | 109 | libs: [ |
Jeff Sharkey | 3e91c2b | 2024-02-15 14:12:07 -0700 | [diff] [blame] | 110 | "android.test.mock", |
Jeff Sharkey | 5e210d7 | 2023-11-10 11:22:05 -0700 | [diff] [blame] | 111 | "framework-minus-apex.ravenwood", |
Jeff Sharkey | 8a922ec | 2024-02-27 12:36:36 -0700 | [diff] [blame] | 112 | "ravenwood-framework", |
Jeff Sharkey | 3e91c2b | 2024-02-15 14:12:07 -0700 | [diff] [blame] | 113 | "services.core.ravenwood", |
Jeff Sharkey | 91f414e | 2023-11-07 15:43:59 -0700 | [diff] [blame] | 114 | "junit", |
| 115 | ], |
Makoto Onuki | a8bcba1 | 2023-11-22 14:00:24 -0800 | [diff] [blame] | 116 | sdk_version: "core_current", |
Jeff Sharkey | 41cfbb3 | 2023-11-16 09:26:28 -0700 | [diff] [blame] | 117 | visibility: ["//frameworks/base"], |
Jeff Sharkey | 3e91c2b | 2024-02-15 14:12:07 -0700 | [diff] [blame] | 118 | jarjar_rules: ":ravenwood-services-jarjar-rules", |
Jeff Sharkey | 41cfbb3 | 2023-11-16 09:26:28 -0700 | [diff] [blame] | 119 | } |
| 120 | |
Jeff Sharkey | 7037e35 | 2024-02-27 14:22:24 -0700 | [diff] [blame] | 121 | // Separated out from ravenwood-junit-impl since it needs to compile |
| 122 | // against `module_current` |
| 123 | java_library { |
| 124 | name: "ravenwood-junit-impl-flag", |
| 125 | srcs: [ |
| 126 | "junit-flag-src/**/*.java", |
| 127 | ], |
| 128 | sdk_version: "module_current", |
| 129 | libs: [ |
| 130 | "junit", |
| 131 | "flag-junit", |
| 132 | ], |
| 133 | visibility: ["//visibility:public"], |
| 134 | } |
| 135 | |
Jeff Sharkey | 41cfbb3 | 2023-11-16 09:26:28 -0700 | [diff] [blame] | 136 | // Carefully compiles against only test_current to support tests that |
| 137 | // want to verify they're unbundled. The "impl" library above is what |
| 138 | // ships inside the Ravenwood environment to actually drive any API |
| 139 | // access to implementation details. |
| 140 | java_library { |
| 141 | name: "ravenwood-junit", |
| 142 | srcs: [ |
| 143 | "junit-src/**/*.java", |
| 144 | "junit-stub-src/**/*.java", |
Jeff Sharkey | 7037e35 | 2024-02-27 14:22:24 -0700 | [diff] [blame] | 145 | "junit-flag-src/**/*.java", |
Jeff Sharkey | 41cfbb3 | 2023-11-16 09:26:28 -0700 | [diff] [blame] | 146 | ], |
| 147 | sdk_version: "test_current", |
| 148 | libs: [ |
| 149 | "junit", |
Jeff Sharkey | 7037e35 | 2024-02-27 14:22:24 -0700 | [diff] [blame] | 150 | "flag-junit", |
Jeff Sharkey | 41cfbb3 | 2023-11-16 09:26:28 -0700 | [diff] [blame] | 151 | ], |
Jeff Sharkey | 91f414e | 2023-11-07 15:43:59 -0700 | [diff] [blame] | 152 | visibility: ["//visibility:public"], |
| 153 | } |
Jeff Sharkey | 4ee8a65 | 2023-11-14 08:45:56 -0700 | [diff] [blame] | 154 | |
Jeff Sharkey | 8a922ec | 2024-02-27 12:36:36 -0700 | [diff] [blame] | 155 | // Library used to publish a handful of `android.ravenwood` APIs into |
| 156 | // the Ravenwood BCP; we don't want to publish these APIs into the BCP |
| 157 | // on physical devices, which is why this is a separate library |
| 158 | java_library { |
| 159 | name: "ravenwood-framework", |
| 160 | srcs: [ |
| 161 | "framework-src/**/*.java", |
| 162 | ], |
| 163 | libs: [ |
| 164 | "framework-minus-apex.ravenwood", |
| 165 | ], |
| 166 | sdk_version: "core_current", |
| 167 | visibility: ["//visibility:public"], |
| 168 | } |
| 169 | |
Jeff Sharkey | c91451a | 2024-01-29 10:55:45 -0700 | [diff] [blame] | 170 | java_host_for_device { |
| 171 | name: "androidx.test.monitor-for-device", |
| 172 | libs: [ |
| 173 | "androidx.test.monitor-for-host", |
| 174 | ], |
| 175 | } |
| 176 | |
| 177 | java_device_for_host { |
| 178 | name: "androidx.test.monitor-for-host", |
| 179 | libs: [ |
| 180 | "androidx.test.monitor", |
| 181 | ], |
| 182 | } |
Jeff Sharkey | 3e91c2b | 2024-02-15 14:12:07 -0700 | [diff] [blame] | 183 | |
| 184 | filegroup { |
| 185 | name: "ravenwood-services-jarjar-rules", |
Makoto Onuki | a3fe562 | 2024-03-27 13:08:32 -0700 | [diff] [blame] | 186 | srcs: ["texts/ravenwood-services-jarjar-rules.txt"], |
Jeff Sharkey | 3e91c2b | 2024-02-15 14:12:07 -0700 | [diff] [blame] | 187 | visibility: ["//frameworks/base"], |
| 188 | } |
Makoto Onuki | 3fb1f2b | 2024-03-27 13:08:32 -0700 | [diff] [blame] | 189 | |
| 190 | // For collecting the *stats.csv files in a known directory under out/host/linux-x86/testcases/. |
| 191 | // The "test" just shows the available stats filenames. |
| 192 | sh_test_host { |
| 193 | name: "ravenwood-stats-checker", |
Makoto Onuki | a3fe562 | 2024-03-27 13:08:32 -0700 | [diff] [blame] | 194 | src: "scripts/ravenwood-stats-checker.sh", |
Makoto Onuki | 3fb1f2b | 2024-03-27 13:08:32 -0700 | [diff] [blame] | 195 | test_suites: ["general-tests"], |
| 196 | data: [ |
| 197 | ":framework-minus-apex.ravenwood.stats", |
Makoto Onuki | 434d7282 | 2024-04-25 11:03:41 -0700 | [diff] [blame] | 198 | ":framework-minus-apex.ravenwood.apis", |
Makoto Onuki | 3fb1f2b | 2024-03-27 13:08:32 -0700 | [diff] [blame] | 199 | ":services.core.ravenwood.stats", |
Makoto Onuki | 434d7282 | 2024-04-25 11:03:41 -0700 | [diff] [blame] | 200 | ":services.core.ravenwood.apis", |
Makoto Onuki | 3fb1f2b | 2024-03-27 13:08:32 -0700 | [diff] [blame] | 201 | ], |
| 202 | } |