Makoto Onuki | 3aefe33 | 2023-10-06 10:02:07 -0700 | [diff] [blame] | 1 | // Copyright (C) 2023 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | // We need this "trampoline" rule to force soong to give a host-side jar to |
Makoto Onuki | c69a84e | 2023-10-20 10:43:55 -0700 | [diff] [blame] | 16 | // framework-minus-apex.ravenwood-base. Otherwise, soong would mix up the arch (?) and we'd get |
Makoto Onuki | 3aefe33 | 2023-10-06 10:02:07 -0700 | [diff] [blame] | 17 | // a dex jar. |
| 18 | java_library { |
| 19 | name: "framework-minus-apex-for-hoststubgen", |
| 20 | installable: false, // host only jar. |
| 21 | static_libs: [ |
| 22 | "framework-minus-apex", |
| 23 | ], |
| 24 | sdk_version: "core_platform", |
| 25 | visibility: ["//visibility:private"], |
| 26 | } |
| 27 | |
| 28 | // Generate the stub/impl from framework-all, with hidden APIs. |
Makoto Onuki | fcf5cde | 2024-08-02 09:11:46 -0700 | [diff] [blame^] | 29 | // This step takes several tens of seconds, so we manually shard it to multiple modules. |
| 30 | // All the copies have to be kept in sync. |
| 31 | // TODO: Do the sharding better. |
| 32 | |
| 33 | genrule_defaults { |
| 34 | name: "framework-minus-apex.ravenwood-base_defaults", |
Makoto Onuki | 3aefe33 | 2023-10-06 10:02:07 -0700 | [diff] [blame] | 35 | tools: ["hoststubgen"], |
Makoto Onuki | 3aefe33 | 2023-10-06 10:02:07 -0700 | [diff] [blame] | 36 | srcs: [ |
| 37 | ":framework-minus-apex-for-hoststubgen", |
Makoto Onuki | dfade84 | 2024-05-02 15:42:08 -0700 | [diff] [blame] | 38 | ":ravenwood-framework-policies", |
| 39 | ":ravenwood-standard-options", |
| 40 | ":ravenwood-annotation-allowed-classes", |
Makoto Onuki | 3aefe33 | 2023-10-06 10:02:07 -0700 | [diff] [blame] | 41 | ], |
| 42 | out: [ |
| 43 | "ravenwood.jar", |
Makoto Onuki | 3aefe33 | 2023-10-06 10:02:07 -0700 | [diff] [blame] | 44 | |
| 45 | // Following files are created just as FYI. |
Makoto Onuki | 134a415 | 2024-06-26 14:21:12 -0700 | [diff] [blame] | 46 | "hoststubgen_framework-minus-apex_keep_all.txt", |
| 47 | "hoststubgen_framework-minus-apex_dump.txt", |
Makoto Onuki | 623cffb | 2023-11-29 10:45:06 -0800 | [diff] [blame] | 48 | |
| 49 | "hoststubgen_framework-minus-apex.log", |
Jeff Sharkey | d2cc191 | 2024-02-09 14:37:10 -0700 | [diff] [blame] | 50 | "hoststubgen_framework-minus-apex_stats.csv", |
Makoto Onuki | 434d7282 | 2024-04-25 11:03:41 -0700 | [diff] [blame] | 51 | "hoststubgen_framework-minus-apex_apis.csv", |
Makoto Onuki | 3aefe33 | 2023-10-06 10:02:07 -0700 | [diff] [blame] | 52 | ], |
Makoto Onuki | fcf5cde | 2024-08-02 09:11:46 -0700 | [diff] [blame^] | 53 | visibility: ["//visibility:private"], |
Makoto Onuki | 3aefe33 | 2023-10-06 10:02:07 -0700 | [diff] [blame] | 54 | } |
| 55 | |
Makoto Onuki | fcf5cde | 2024-08-02 09:11:46 -0700 | [diff] [blame^] | 56 | java_genrule { |
| 57 | name: "framework-minus-apex.ravenwood-base_X0", |
| 58 | defaults: ["framework-minus-apex.ravenwood-base_defaults"], |
| 59 | cmd: "$(location hoststubgen) " + |
| 60 | "--num-shards 6 --shard-index 0 " + // Only this line differs |
| 61 | |
| 62 | "@$(location :ravenwood-standard-options) " + |
| 63 | |
| 64 | "--debug-log $(location hoststubgen_framework-minus-apex.log) " + |
| 65 | "--stats-file $(location hoststubgen_framework-minus-apex_stats.csv) " + |
| 66 | "--supported-api-list-file $(location hoststubgen_framework-minus-apex_apis.csv) " + |
| 67 | |
| 68 | "--out-impl-jar $(location ravenwood.jar) " + |
| 69 | |
| 70 | "--gen-keep-all-file $(location hoststubgen_framework-minus-apex_keep_all.txt) " + |
| 71 | "--gen-input-dump-file $(location hoststubgen_framework-minus-apex_dump.txt) " + |
| 72 | |
| 73 | "--in-jar $(location :framework-minus-apex-for-hoststubgen) " + |
| 74 | "--policy-override-file $(location :ravenwood-framework-policies) " + |
| 75 | "--annotation-allowed-classes-file $(location :ravenwood-annotation-allowed-classes) ", |
| 76 | } |
| 77 | |
| 78 | java_genrule { |
| 79 | name: "framework-minus-apex.ravenwood-base_X1", |
| 80 | defaults: ["framework-minus-apex.ravenwood-base_defaults"], |
| 81 | cmd: "$(location hoststubgen) " + |
| 82 | "--num-shards 6 --shard-index 1 " + // Only this line differs |
| 83 | |
| 84 | "@$(location :ravenwood-standard-options) " + |
| 85 | |
| 86 | "--debug-log $(location hoststubgen_framework-minus-apex.log) " + |
| 87 | "--stats-file $(location hoststubgen_framework-minus-apex_stats.csv) " + |
| 88 | "--supported-api-list-file $(location hoststubgen_framework-minus-apex_apis.csv) " + |
| 89 | |
| 90 | "--out-impl-jar $(location ravenwood.jar) " + |
| 91 | |
| 92 | "--gen-keep-all-file $(location hoststubgen_framework-minus-apex_keep_all.txt) " + |
| 93 | "--gen-input-dump-file $(location hoststubgen_framework-minus-apex_dump.txt) " + |
| 94 | |
| 95 | "--in-jar $(location :framework-minus-apex-for-hoststubgen) " + |
| 96 | "--policy-override-file $(location :ravenwood-framework-policies) " + |
| 97 | "--annotation-allowed-classes-file $(location :ravenwood-annotation-allowed-classes) ", |
| 98 | } |
| 99 | |
| 100 | java_genrule { |
| 101 | name: "framework-minus-apex.ravenwood-base_X2", |
| 102 | defaults: ["framework-minus-apex.ravenwood-base_defaults"], |
| 103 | cmd: "$(location hoststubgen) " + |
| 104 | "--num-shards 6 --shard-index 2 " + // Only this line differs |
| 105 | |
| 106 | "@$(location :ravenwood-standard-options) " + |
| 107 | |
| 108 | "--debug-log $(location hoststubgen_framework-minus-apex.log) " + |
| 109 | "--stats-file $(location hoststubgen_framework-minus-apex_stats.csv) " + |
| 110 | "--supported-api-list-file $(location hoststubgen_framework-minus-apex_apis.csv) " + |
| 111 | |
| 112 | "--out-impl-jar $(location ravenwood.jar) " + |
| 113 | |
| 114 | "--gen-keep-all-file $(location hoststubgen_framework-minus-apex_keep_all.txt) " + |
| 115 | "--gen-input-dump-file $(location hoststubgen_framework-minus-apex_dump.txt) " + |
| 116 | |
| 117 | "--in-jar $(location :framework-minus-apex-for-hoststubgen) " + |
| 118 | "--policy-override-file $(location :ravenwood-framework-policies) " + |
| 119 | "--annotation-allowed-classes-file $(location :ravenwood-annotation-allowed-classes) ", |
| 120 | } |
| 121 | |
| 122 | java_genrule { |
| 123 | name: "framework-minus-apex.ravenwood-base_X3", |
| 124 | defaults: ["framework-minus-apex.ravenwood-base_defaults"], |
| 125 | cmd: "$(location hoststubgen) " + |
| 126 | "--num-shards 6 --shard-index 3 " + // Only this line differs |
| 127 | |
| 128 | "@$(location :ravenwood-standard-options) " + |
| 129 | |
| 130 | "--debug-log $(location hoststubgen_framework-minus-apex.log) " + |
| 131 | "--stats-file $(location hoststubgen_framework-minus-apex_stats.csv) " + |
| 132 | "--supported-api-list-file $(location hoststubgen_framework-minus-apex_apis.csv) " + |
| 133 | |
| 134 | "--out-impl-jar $(location ravenwood.jar) " + |
| 135 | |
| 136 | "--gen-keep-all-file $(location hoststubgen_framework-minus-apex_keep_all.txt) " + |
| 137 | "--gen-input-dump-file $(location hoststubgen_framework-minus-apex_dump.txt) " + |
| 138 | |
| 139 | "--in-jar $(location :framework-minus-apex-for-hoststubgen) " + |
| 140 | "--policy-override-file $(location :ravenwood-framework-policies) " + |
| 141 | "--annotation-allowed-classes-file $(location :ravenwood-annotation-allowed-classes) ", |
| 142 | } |
| 143 | |
| 144 | java_genrule { |
| 145 | name: "framework-minus-apex.ravenwood-base_X4", |
| 146 | defaults: ["framework-minus-apex.ravenwood-base_defaults"], |
| 147 | cmd: "$(location hoststubgen) " + |
| 148 | "--num-shards 6 --shard-index 4 " + // Only this line differs |
| 149 | |
| 150 | "@$(location :ravenwood-standard-options) " + |
| 151 | |
| 152 | "--debug-log $(location hoststubgen_framework-minus-apex.log) " + |
| 153 | "--stats-file $(location hoststubgen_framework-minus-apex_stats.csv) " + |
| 154 | "--supported-api-list-file $(location hoststubgen_framework-minus-apex_apis.csv) " + |
| 155 | |
| 156 | "--out-impl-jar $(location ravenwood.jar) " + |
| 157 | |
| 158 | "--gen-keep-all-file $(location hoststubgen_framework-minus-apex_keep_all.txt) " + |
| 159 | "--gen-input-dump-file $(location hoststubgen_framework-minus-apex_dump.txt) " + |
| 160 | |
| 161 | "--in-jar $(location :framework-minus-apex-for-hoststubgen) " + |
| 162 | "--policy-override-file $(location :ravenwood-framework-policies) " + |
| 163 | "--annotation-allowed-classes-file $(location :ravenwood-annotation-allowed-classes) ", |
| 164 | } |
| 165 | |
| 166 | java_genrule { |
| 167 | name: "framework-minus-apex.ravenwood-base_X5", |
| 168 | defaults: ["framework-minus-apex.ravenwood-base_defaults"], |
| 169 | cmd: "$(location hoststubgen) " + |
| 170 | "--num-shards 6 --shard-index 5 " + // Only this line differs |
| 171 | |
| 172 | "@$(location :ravenwood-standard-options) " + |
| 173 | |
| 174 | "--debug-log $(location hoststubgen_framework-minus-apex.log) " + |
| 175 | "--stats-file $(location hoststubgen_framework-minus-apex_stats.csv) " + |
| 176 | "--supported-api-list-file $(location hoststubgen_framework-minus-apex_apis.csv) " + |
| 177 | |
| 178 | "--out-impl-jar $(location ravenwood.jar) " + |
| 179 | |
| 180 | "--gen-keep-all-file $(location hoststubgen_framework-minus-apex_keep_all.txt) " + |
| 181 | "--gen-input-dump-file $(location hoststubgen_framework-minus-apex_dump.txt) " + |
| 182 | |
| 183 | "--in-jar $(location :framework-minus-apex-for-hoststubgen) " + |
| 184 | "--policy-override-file $(location :ravenwood-framework-policies) " + |
| 185 | "--annotation-allowed-classes-file $(location :ravenwood-annotation-allowed-classes) ", |
| 186 | } |
| 187 | |
| 188 | // Marge all the sharded jars |
Makoto Onuki | c69a84e | 2023-10-20 10:43:55 -0700 | [diff] [blame] | 189 | java_genrule { |
Makoto Onuki | 3aefe33 | 2023-10-06 10:02:07 -0700 | [diff] [blame] | 190 | name: "framework-minus-apex.ravenwood", |
Makoto Onuki | fcf5cde | 2024-08-02 09:11:46 -0700 | [diff] [blame^] | 191 | defaults: ["ravenwood-internal-only-visibility-java"], |
| 192 | cmd: "$(location merge_zips) $(out) $(in)", |
| 193 | tools: ["merge_zips"], |
Makoto Onuki | 3aefe33 | 2023-10-06 10:02:07 -0700 | [diff] [blame] | 194 | srcs: [ |
Makoto Onuki | fcf5cde | 2024-08-02 09:11:46 -0700 | [diff] [blame^] | 195 | ":framework-minus-apex.ravenwood-base_X0{ravenwood.jar}", |
| 196 | ":framework-minus-apex.ravenwood-base_X1{ravenwood.jar}", |
| 197 | ":framework-minus-apex.ravenwood-base_X2{ravenwood.jar}", |
| 198 | ":framework-minus-apex.ravenwood-base_X3{ravenwood.jar}", |
| 199 | ":framework-minus-apex.ravenwood-base_X4{ravenwood.jar}", |
| 200 | ":framework-minus-apex.ravenwood-base_X5{ravenwood.jar}", |
Makoto Onuki | 3aefe33 | 2023-10-06 10:02:07 -0700 | [diff] [blame] | 201 | ], |
| 202 | out: [ |
| 203 | "framework-minus-apex.ravenwood.jar", |
| 204 | ], |
Makoto Onuki | 3aefe33 | 2023-10-06 10:02:07 -0700 | [diff] [blame] | 205 | } |
Makoto Onuki | c69a84e | 2023-10-20 10:43:55 -0700 | [diff] [blame] | 206 | |
Makoto Onuki | fcf5cde | 2024-08-02 09:11:46 -0700 | [diff] [blame^] | 207 | // Merge the sharded text files |
| 208 | genrule { |
| 209 | name: "hoststubgen_framework-minus-apex_stats.csv", |
| 210 | defaults: ["ravenwood-internal-only-visibility-genrule"], |
| 211 | cmd: "cat $(in) > $(out)", |
| 212 | srcs: [ |
| 213 | ":framework-minus-apex.ravenwood-base_X0{hoststubgen_framework-minus-apex_stats.csv}", |
| 214 | ":framework-minus-apex.ravenwood-base_X1{hoststubgen_framework-minus-apex_stats.csv}", |
| 215 | ":framework-minus-apex.ravenwood-base_X2{hoststubgen_framework-minus-apex_stats.csv}", |
| 216 | ":framework-minus-apex.ravenwood-base_X3{hoststubgen_framework-minus-apex_stats.csv}", |
| 217 | ":framework-minus-apex.ravenwood-base_X4{hoststubgen_framework-minus-apex_stats.csv}", |
| 218 | ":framework-minus-apex.ravenwood-base_X5{hoststubgen_framework-minus-apex_stats.csv}", |
| 219 | ], |
| 220 | out: ["hoststubgen_framework-minus-apex_stats.csv"], |
| 221 | } |
| 222 | |
| 223 | genrule { |
| 224 | name: "hoststubgen_framework-minus-apex_apis.csv", |
| 225 | defaults: ["ravenwood-internal-only-visibility-genrule"], |
| 226 | cmd: "cat $(in) > $(out)", |
| 227 | srcs: [ |
| 228 | ":framework-minus-apex.ravenwood-base_X0{hoststubgen_framework-minus-apex_apis.csv}", |
| 229 | ":framework-minus-apex.ravenwood-base_X1{hoststubgen_framework-minus-apex_apis.csv}", |
| 230 | ":framework-minus-apex.ravenwood-base_X2{hoststubgen_framework-minus-apex_apis.csv}", |
| 231 | ":framework-minus-apex.ravenwood-base_X3{hoststubgen_framework-minus-apex_apis.csv}", |
| 232 | ":framework-minus-apex.ravenwood-base_X4{hoststubgen_framework-minus-apex_apis.csv}", |
| 233 | ":framework-minus-apex.ravenwood-base_X5{hoststubgen_framework-minus-apex_apis.csv}", |
| 234 | ], |
| 235 | out: ["hoststubgen_framework-minus-apex_apis.csv"], |
| 236 | } |
| 237 | |
| 238 | genrule { |
| 239 | name: "hoststubgen_framework-minus-apex_keep_all.txt", |
| 240 | defaults: ["ravenwood-internal-only-visibility-genrule"], |
| 241 | cmd: "cat $(in) > $(out)", |
| 242 | srcs: [ |
| 243 | ":framework-minus-apex.ravenwood-base_X0{hoststubgen_framework-minus-apex_keep_all.txt}", |
| 244 | ":framework-minus-apex.ravenwood-base_X1{hoststubgen_framework-minus-apex_keep_all.txt}", |
| 245 | ":framework-minus-apex.ravenwood-base_X2{hoststubgen_framework-minus-apex_keep_all.txt}", |
| 246 | ":framework-minus-apex.ravenwood-base_X3{hoststubgen_framework-minus-apex_keep_all.txt}", |
| 247 | ":framework-minus-apex.ravenwood-base_X4{hoststubgen_framework-minus-apex_keep_all.txt}", |
| 248 | ":framework-minus-apex.ravenwood-base_X5{hoststubgen_framework-minus-apex_keep_all.txt}", |
| 249 | ], |
| 250 | out: ["hoststubgen_framework-minus-apex_keep_all.txt"], |
| 251 | } |
| 252 | |
| 253 | genrule { |
| 254 | name: "hoststubgen_framework-minus-apex_dump.txt", |
| 255 | defaults: ["ravenwood-internal-only-visibility-genrule"], |
| 256 | cmd: "cat $(in) > $(out)", |
| 257 | srcs: [ |
| 258 | ":framework-minus-apex.ravenwood-base_X0{hoststubgen_framework-minus-apex_dump.txt}", |
| 259 | ":framework-minus-apex.ravenwood-base_X1{hoststubgen_framework-minus-apex_dump.txt}", |
| 260 | ":framework-minus-apex.ravenwood-base_X2{hoststubgen_framework-minus-apex_dump.txt}", |
| 261 | ":framework-minus-apex.ravenwood-base_X3{hoststubgen_framework-minus-apex_dump.txt}", |
| 262 | ":framework-minus-apex.ravenwood-base_X4{hoststubgen_framework-minus-apex_dump.txt}", |
| 263 | ":framework-minus-apex.ravenwood-base_X5{hoststubgen_framework-minus-apex_dump.txt}", |
| 264 | ], |
| 265 | out: ["hoststubgen_framework-minus-apex_dump.txt"], |
| 266 | } |
| 267 | |
Jeff Sharkey | ed81c78 | 2024-01-11 13:29:07 -0700 | [diff] [blame] | 268 | java_library { |
Jeff Sharkey | 3e91c2b | 2024-02-15 14:12:07 -0700 | [diff] [blame] | 269 | name: "services.core-for-hoststubgen", |
| 270 | installable: false, // host only jar. |
| 271 | static_libs: [ |
| 272 | "services.core", |
| 273 | ], |
| 274 | sdk_version: "core_platform", |
| 275 | visibility: ["//visibility:private"], |
| 276 | } |
| 277 | |
| 278 | java_genrule { |
| 279 | name: "services.core.ravenwood-base", |
| 280 | tools: ["hoststubgen"], |
| 281 | cmd: "$(location hoststubgen) " + |
Makoto Onuki | dfade84 | 2024-05-02 15:42:08 -0700 | [diff] [blame] | 282 | "@$(location :ravenwood-standard-options) " + |
Jeff Sharkey | 3e91c2b | 2024-02-15 14:12:07 -0700 | [diff] [blame] | 283 | |
| 284 | "--debug-log $(location hoststubgen_services.core.log) " + |
| 285 | "--stats-file $(location hoststubgen_services.core_stats.csv) " + |
Makoto Onuki | 434d7282 | 2024-04-25 11:03:41 -0700 | [diff] [blame] | 286 | "--supported-api-list-file $(location hoststubgen_services.core_apis.csv) " + |
Jeff Sharkey | 3e91c2b | 2024-02-15 14:12:07 -0700 | [diff] [blame] | 287 | |
| 288 | "--out-impl-jar $(location ravenwood.jar) " + |
| 289 | |
Makoto Onuki | 134a415 | 2024-06-26 14:21:12 -0700 | [diff] [blame] | 290 | "--gen-keep-all-file $(location hoststubgen_services.core_keep_all.txt) " + |
| 291 | "--gen-input-dump-file $(location hoststubgen_services.core_dump.txt) " + |
Jeff Sharkey | 3e91c2b | 2024-02-15 14:12:07 -0700 | [diff] [blame] | 292 | |
| 293 | "--in-jar $(location :services.core-for-hoststubgen) " + |
Makoto Onuki | dfade84 | 2024-05-02 15:42:08 -0700 | [diff] [blame] | 294 | "--policy-override-file $(location :ravenwood-services-policies) " + |
| 295 | "--annotation-allowed-classes-file $(location :ravenwood-annotation-allowed-classes) ", |
Jeff Sharkey | 3e91c2b | 2024-02-15 14:12:07 -0700 | [diff] [blame] | 296 | srcs: [ |
| 297 | ":services.core-for-hoststubgen", |
Makoto Onuki | dfade84 | 2024-05-02 15:42:08 -0700 | [diff] [blame] | 298 | ":ravenwood-services-policies", |
| 299 | ":ravenwood-standard-options", |
| 300 | ":ravenwood-annotation-allowed-classes", |
Jeff Sharkey | 3e91c2b | 2024-02-15 14:12:07 -0700 | [diff] [blame] | 301 | ], |
| 302 | out: [ |
| 303 | "ravenwood.jar", |
| 304 | |
| 305 | // Following files are created just as FYI. |
Makoto Onuki | 134a415 | 2024-06-26 14:21:12 -0700 | [diff] [blame] | 306 | "hoststubgen_services.core_keep_all.txt", |
| 307 | "hoststubgen_services.core_dump.txt", |
Jeff Sharkey | 3e91c2b | 2024-02-15 14:12:07 -0700 | [diff] [blame] | 308 | |
| 309 | "hoststubgen_services.core.log", |
| 310 | "hoststubgen_services.core_stats.csv", |
Makoto Onuki | 434d7282 | 2024-04-25 11:03:41 -0700 | [diff] [blame] | 311 | "hoststubgen_services.core_apis.csv", |
Jeff Sharkey | 3e91c2b | 2024-02-15 14:12:07 -0700 | [diff] [blame] | 312 | ], |
Makoto Onuki | 134a415 | 2024-06-26 14:21:12 -0700 | [diff] [blame] | 313 | defaults: ["ravenwood-internal-only-visibility-genrule"], |
Jeff Sharkey | 3e91c2b | 2024-02-15 14:12:07 -0700 | [diff] [blame] | 314 | } |
| 315 | |
| 316 | java_genrule { |
| 317 | name: "services.core.ravenwood", |
| 318 | defaults: ["ravenwood-internal-only-visibility-genrule"], |
| 319 | cmd: "cp $(in) $(out)", |
| 320 | srcs: [ |
| 321 | ":services.core.ravenwood-base{ravenwood.jar}", |
| 322 | ], |
| 323 | out: [ |
| 324 | "services.core.ravenwood.jar", |
| 325 | ], |
| 326 | } |
| 327 | |
| 328 | java_library { |
| 329 | name: "services.core.ravenwood-jarjar", |
Makoto Onuki | e5e9727 | 2024-05-23 10:49:31 -0700 | [diff] [blame] | 330 | defaults: ["ravenwood-internal-only-visibility-java"], |
Jeff Sharkey | 3e91c2b | 2024-02-15 14:12:07 -0700 | [diff] [blame] | 331 | installable: false, |
| 332 | static_libs: [ |
| 333 | "services.core.ravenwood", |
| 334 | ], |
| 335 | jarjar_rules: ":ravenwood-services-jarjar-rules", |
Jeff Sharkey | ed81c78 | 2024-01-11 13:29:07 -0700 | [diff] [blame] | 336 | } |
| 337 | |
Makoto Onuki | 053eac8 | 2024-02-13 10:31:18 -0800 | [diff] [blame] | 338 | // Jars in "ravenwood-runtime" are set to the classpath, sorted alphabetically. |
| 339 | // Rename some of the dependencies to make sure they're included in the intended order. |
Makoto Onuki | f38d599 | 2024-05-30 10:40:50 -0700 | [diff] [blame] | 340 | // Also apply jarjar. |
| 341 | java_library { |
Makoto Onuki | 053eac8 | 2024-02-13 10:31:18 -0800 | [diff] [blame] | 342 | name: "100-framework-minus-apex.ravenwood", |
Makoto Onuki | f38d599 | 2024-05-30 10:40:50 -0700 | [diff] [blame] | 343 | defaults: ["ravenwood-internal-only-visibility-java"], |
| 344 | static_libs: [ |
| 345 | "framework-minus-apex.ravenwood", |
| 346 | ], |
| 347 | sdk_version: "core_platform", |
Makoto Onuki | 7645fa8 | 2024-08-02 10:47:55 -0700 | [diff] [blame] | 348 | // See b/313930116. Jarjar is too slow on this jar. We use HostStubGen to do the rename. |
| 349 | // jarjar_rules: ":ravenwood-framework-jarjar-rules", |
Makoto Onuki | 053eac8 | 2024-02-13 10:31:18 -0800 | [diff] [blame] | 350 | } |
| 351 | |
| 352 | java_genrule { |
| 353 | // Use 200 to make sure it comes before the mainline stub ("all-updatable..."). |
| 354 | name: "200-kxml2-android", |
Makoto Onuki | e5e9727 | 2024-05-23 10:49:31 -0700 | [diff] [blame] | 355 | defaults: ["ravenwood-internal-only-visibility-genrule"], |
Makoto Onuki | 053eac8 | 2024-02-13 10:31:18 -0800 | [diff] [blame] | 356 | cmd: "cp $(in) $(out)", |
| 357 | srcs: [":kxml2-android"], |
| 358 | out: ["200-kxml2-android.jar"], |
Makoto Onuki | 053eac8 | 2024-02-13 10:31:18 -0800 | [diff] [blame] | 359 | } |
| 360 | |
Makoto Onuki | d8231fe | 2024-05-10 12:49:24 -0700 | [diff] [blame] | 361 | java_genrule { |
| 362 | name: "z00-all-updatable-modules-system-stubs", |
Makoto Onuki | e5e9727 | 2024-05-23 10:49:31 -0700 | [diff] [blame] | 363 | defaults: ["ravenwood-internal-only-visibility-genrule"], |
Makoto Onuki | d8231fe | 2024-05-10 12:49:24 -0700 | [diff] [blame] | 364 | cmd: "cp $(in) $(out)", |
| 365 | srcs: [":all-updatable-modules-system-stubs"], |
| 366 | out: ["z00-all-updatable-modules-system-stubs.jar"], |
Makoto Onuki | c69a84e | 2023-10-20 10:43:55 -0700 | [diff] [blame] | 367 | } |