Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 1 | // Copyright 2021 Google Inc. All rights reserved. |
| 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 | package android |
| 16 | |
| 17 | import ( |
| 18 | "fmt" |
| 19 | "strconv" |
| 20 | "strings" |
| 21 | ) |
| 22 | |
| 23 | type SdkContext interface { |
| 24 | // SdkVersion returns SdkSpec that corresponds to the sdk_version property of the current module |
Jiyong Park | 9231537 | 2021-04-02 08:45:46 +0900 | [diff] [blame] | 25 | SdkVersion(ctx EarlyModuleContext) SdkSpec |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 26 | // SystemModules returns the system_modules property of the current module, or an empty string if it is not set. |
| 27 | SystemModules() string |
Spandan Das | 8c9ae7e | 2023-03-03 21:20:36 +0000 | [diff] [blame] | 28 | // MinSdkVersion returns ApiLevel that corresponds to the min_sdk_version property of the current module, |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 29 | // or from sdk_version if it is not set. |
Spandan Das | 8c9ae7e | 2023-03-03 21:20:36 +0000 | [diff] [blame] | 30 | MinSdkVersion(ctx EarlyModuleContext) ApiLevel |
Spandan Das | a26eda7 | 2023-03-02 00:56:06 +0000 | [diff] [blame] | 31 | // ReplaceMaxSdkVersionPlaceholder returns Apilevel to replace the maxSdkVersion property of permission and |
William Loh | 5a082f9 | 2022-05-17 20:21:50 +0000 | [diff] [blame] | 32 | // uses-permission tags if it is set. |
Spandan Das | a26eda7 | 2023-03-02 00:56:06 +0000 | [diff] [blame] | 33 | ReplaceMaxSdkVersionPlaceholder(ctx EarlyModuleContext) ApiLevel |
Spandan Das | ca70fc4 | 2023-03-01 23:38:49 +0000 | [diff] [blame] | 34 | // TargetSdkVersion returns the ApiLevel that corresponds to the target_sdk_version property of the current module, |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 35 | // or from sdk_version if it is not set. |
Spandan Das | ca70fc4 | 2023-03-01 23:38:49 +0000 | [diff] [blame] | 36 | TargetSdkVersion(ctx EarlyModuleContext) ApiLevel |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | // SdkKind represents a particular category of an SDK spec like public, system, test, etc. |
| 40 | type SdkKind int |
| 41 | |
| 42 | const ( |
| 43 | SdkInvalid SdkKind = iota |
| 44 | SdkNone |
| 45 | SdkCore |
| 46 | SdkCorePlatform |
Spandan Das | 0b555e3 | 2022-11-28 18:48:51 +0000 | [diff] [blame] | 47 | SdkIntraCore // API surface provided by one core module to another |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 48 | SdkPublic |
| 49 | SdkSystem |
| 50 | SdkTest |
| 51 | SdkModule |
| 52 | SdkSystemServer |
| 53 | SdkPrivate |
Spandan Das | 4ac2aed | 2022-12-28 01:54:29 +0000 | [diff] [blame] | 54 | SdkToolchain // API surface provided by ART to compile other API domains |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 55 | ) |
| 56 | |
| 57 | // String returns the string representation of this SdkKind |
| 58 | func (k SdkKind) String() string { |
| 59 | switch k { |
| 60 | case SdkPrivate: |
| 61 | return "private" |
| 62 | case SdkNone: |
| 63 | return "none" |
| 64 | case SdkPublic: |
| 65 | return "public" |
| 66 | case SdkSystem: |
| 67 | return "system" |
| 68 | case SdkTest: |
| 69 | return "test" |
| 70 | case SdkCore: |
| 71 | return "core" |
| 72 | case SdkCorePlatform: |
| 73 | return "core_platform" |
Spandan Das | 0b555e3 | 2022-11-28 18:48:51 +0000 | [diff] [blame] | 74 | case SdkIntraCore: |
| 75 | return "intracore" |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 76 | case SdkModule: |
| 77 | return "module-lib" |
| 78 | case SdkSystemServer: |
| 79 | return "system-server" |
Spandan Das | 4ac2aed | 2022-12-28 01:54:29 +0000 | [diff] [blame] | 80 | case SdkToolchain: |
| 81 | return "toolchain" |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 82 | default: |
| 83 | return "invalid" |
| 84 | } |
| 85 | } |
| 86 | |
Spandan Das | 626a8ad | 2023-03-20 18:52:50 +0000 | [diff] [blame] | 87 | // JavaLibraryName returns the soong module containing the Java APIs of that API surface. |
| 88 | func (k SdkKind) JavaLibraryName(c Config) string { |
| 89 | name := k.defaultJavaLibraryName() |
Spandan Das | 69f4218 | 2023-03-29 16:25:16 +0000 | [diff] [blame^] | 90 | return JavaApiLibraryName(c, name) |
Spandan Das | 626a8ad | 2023-03-20 18:52:50 +0000 | [diff] [blame] | 91 | } |
| 92 | |
Spandan Das | 69f4218 | 2023-03-29 16:25:16 +0000 | [diff] [blame^] | 93 | // JavaApiLibraryName returns the name of .txt equivalent of a java_library, but does |
Spandan Das | 626a8ad | 2023-03-20 18:52:50 +0000 | [diff] [blame] | 94 | // not check if either module exists. |
| 95 | // TODO: Return .txt (single-tree or multi-tree equivalents) based on config |
Spandan Das | 69f4218 | 2023-03-29 16:25:16 +0000 | [diff] [blame^] | 96 | func JavaApiLibraryName(c Config, name string) string { |
Jihoon Kang | 1bff034 | 2023-01-17 20:40:22 +0000 | [diff] [blame] | 97 | if c.BuildFromTextStub() { |
| 98 | return name + ".from-text" |
| 99 | } |
Spandan Das | 626a8ad | 2023-03-20 18:52:50 +0000 | [diff] [blame] | 100 | return name |
| 101 | } |
| 102 | |
| 103 | func (k SdkKind) defaultJavaLibraryName() string { |
| 104 | switch k { |
| 105 | case SdkPublic: |
| 106 | return "android_stubs_current" |
| 107 | case SdkSystem: |
| 108 | return "android_system_stubs_current" |
| 109 | case SdkTest: |
| 110 | return "android_test_stubs_current" |
| 111 | case SdkCore: |
| 112 | return "core.current.stubs" |
| 113 | case SdkModule: |
| 114 | return "android_module_lib_stubs_current" |
| 115 | case SdkSystemServer: |
| 116 | return "android_system_server_stubs_current" |
| 117 | default: |
| 118 | panic(fmt.Errorf("APIs of API surface %v cannot be provided by a single Soong module\n", k)) |
| 119 | } |
| 120 | } |
| 121 | |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 122 | // SdkSpec represents the kind and the version of an SDK for a module to build against |
| 123 | type SdkSpec struct { |
Jiyong Park | 54105c4 | 2021-03-31 18:17:53 +0900 | [diff] [blame] | 124 | Kind SdkKind |
| 125 | ApiLevel ApiLevel |
| 126 | Raw string |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 127 | } |
| 128 | |
| 129 | func (s SdkSpec) String() string { |
Jiyong Park | 54105c4 | 2021-03-31 18:17:53 +0900 | [diff] [blame] | 130 | return fmt.Sprintf("%s_%s", s.Kind, s.ApiLevel) |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 131 | } |
| 132 | |
| 133 | // Valid checks if this SdkSpec is well-formed. Note however that true doesn't mean that the |
| 134 | // specified SDK actually exists. |
| 135 | func (s SdkSpec) Valid() bool { |
| 136 | return s.Kind != SdkInvalid |
| 137 | } |
| 138 | |
| 139 | // Specified checks if this SdkSpec is well-formed and is not "". |
| 140 | func (s SdkSpec) Specified() bool { |
| 141 | return s.Valid() && s.Kind != SdkPrivate |
| 142 | } |
| 143 | |
| 144 | // whether the API surface is managed and versioned, i.e. has .txt file that |
| 145 | // get frozen on SDK freeze and changes get reviewed by API council. |
| 146 | func (s SdkSpec) Stable() bool { |
| 147 | if !s.Specified() { |
| 148 | return false |
| 149 | } |
| 150 | switch s.Kind { |
| 151 | case SdkNone: |
| 152 | // there is nothing to manage and version in this case; de facto stable API. |
| 153 | return true |
| 154 | case SdkCore, SdkPublic, SdkSystem, SdkModule, SdkSystemServer: |
| 155 | return true |
| 156 | case SdkCorePlatform, SdkTest, SdkPrivate: |
| 157 | return false |
| 158 | default: |
| 159 | panic(fmt.Errorf("unknown SdkKind=%v", s.Kind)) |
| 160 | } |
| 161 | return false |
| 162 | } |
| 163 | |
satayev | 0ee2f91 | 2021-12-01 17:39:48 +0000 | [diff] [blame] | 164 | // PrebuiltSdkAvailableForUnbundledBuild tells whether this SdkSpec can have a prebuilt SDK |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 165 | // that can be used for unbundled builds. |
| 166 | func (s SdkSpec) PrebuiltSdkAvailableForUnbundledBuild() bool { |
| 167 | // "", "none", and "core_platform" are not available for unbundled build |
| 168 | // as we don't/can't have prebuilt stub for the versions |
| 169 | return s.Kind != SdkPrivate && s.Kind != SdkNone && s.Kind != SdkCorePlatform |
| 170 | } |
| 171 | |
| 172 | func (s SdkSpec) ForVendorPartition(ctx EarlyModuleContext) SdkSpec { |
| 173 | // If BOARD_CURRENT_API_LEVEL_FOR_VENDOR_MODULES has a numeric value, |
| 174 | // use it instead of "current" for the vendor partition. |
| 175 | currentSdkVersion := ctx.DeviceConfig().CurrentApiLevelForVendorModules() |
| 176 | if currentSdkVersion == "current" { |
| 177 | return s |
| 178 | } |
| 179 | |
| 180 | if s.Kind == SdkPublic || s.Kind == SdkSystem { |
Jiyong Park | 54105c4 | 2021-03-31 18:17:53 +0900 | [diff] [blame] | 181 | if s.ApiLevel.IsCurrent() { |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 182 | if i, err := strconv.Atoi(currentSdkVersion); err == nil { |
Jiyong Park | 54105c4 | 2021-03-31 18:17:53 +0900 | [diff] [blame] | 183 | apiLevel := uncheckedFinalApiLevel(i) |
| 184 | return SdkSpec{s.Kind, apiLevel, s.Raw} |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 185 | } |
| 186 | panic(fmt.Errorf("BOARD_CURRENT_API_LEVEL_FOR_VENDOR_MODULES must be either \"current\" or a number, but was %q", currentSdkVersion)) |
| 187 | } |
| 188 | } |
| 189 | return s |
| 190 | } |
| 191 | |
| 192 | // UsePrebuilt determines whether prebuilt SDK should be used for this SdkSpec with the given context. |
| 193 | func (s SdkSpec) UsePrebuilt(ctx EarlyModuleContext) bool { |
Jiyong Park | c702204 | 2021-04-15 16:53:05 +0900 | [diff] [blame] | 194 | switch s { |
| 195 | case SdkSpecNone, SdkSpecCorePlatform, SdkSpecPrivate: |
| 196 | return false |
| 197 | } |
| 198 | |
Jiyong Park | 54105c4 | 2021-03-31 18:17:53 +0900 | [diff] [blame] | 199 | if s.ApiLevel.IsCurrent() { |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 200 | // "current" can be built from source and be from prebuilt SDK |
| 201 | return ctx.Config().AlwaysUsePrebuiltSdks() |
Jiyong Park | 54105c4 | 2021-03-31 18:17:53 +0900 | [diff] [blame] | 202 | } else if !s.ApiLevel.IsPreview() { |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 203 | // validation check |
Paul Duffin | 12e311d | 2021-10-28 17:42:16 +0100 | [diff] [blame] | 204 | if s.Kind != SdkPublic && s.Kind != SdkSystem && s.Kind != SdkTest && s.Kind != SdkModule && s.Kind != SdkSystemServer { |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 205 | panic(fmt.Errorf("prebuilt SDK is not not available for SdkKind=%q", s.Kind)) |
| 206 | return false |
| 207 | } |
| 208 | // numbered SDKs are always from prebuilt |
| 209 | return true |
| 210 | } |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 211 | return false |
| 212 | } |
| 213 | |
Jiyong Park | 54105c4 | 2021-03-31 18:17:53 +0900 | [diff] [blame] | 214 | // EffectiveVersion converts an SdkSpec into the concrete ApiLevel that the module should use. For |
| 215 | // modules targeting an unreleased SDK (meaning it does not yet have a number) it returns |
| 216 | // FutureApiLevel(10000). |
| 217 | func (s SdkSpec) EffectiveVersion(ctx EarlyModuleContext) (ApiLevel, error) { |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 218 | if !s.Valid() { |
Jiyong Park | 54105c4 | 2021-03-31 18:17:53 +0900 | [diff] [blame] | 219 | return s.ApiLevel, fmt.Errorf("invalid sdk version %q", s.Raw) |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 220 | } |
| 221 | |
| 222 | if ctx.DeviceSpecific() || ctx.SocSpecific() { |
| 223 | s = s.ForVendorPartition(ctx) |
| 224 | } |
Spandan Das | dd7057c | 2023-01-05 01:03:47 +0000 | [diff] [blame] | 225 | return s.ApiLevel.EffectiveVersion(ctx) |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 226 | } |
| 227 | |
| 228 | // EffectiveVersionString converts an SdkSpec into the concrete version string that the module |
| 229 | // should use. For modules targeting an unreleased SDK (meaning it does not yet have a number) |
| 230 | // it returns the codename (P, Q, R, etc.) |
| 231 | func (s SdkSpec) EffectiveVersionString(ctx EarlyModuleContext) (string, error) { |
Jiyong Park | 54105c4 | 2021-03-31 18:17:53 +0900 | [diff] [blame] | 232 | if !s.Valid() { |
| 233 | return s.ApiLevel.String(), fmt.Errorf("invalid sdk version %q", s.Raw) |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 234 | } |
Jiyong Park | 54105c4 | 2021-03-31 18:17:53 +0900 | [diff] [blame] | 235 | |
| 236 | if ctx.DeviceSpecific() || ctx.SocSpecific() { |
| 237 | s = s.ForVendorPartition(ctx) |
| 238 | } |
Spandan Das | dd7057c | 2023-01-05 01:03:47 +0000 | [diff] [blame] | 239 | return s.ApiLevel.EffectiveVersionString(ctx) |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 240 | } |
| 241 | |
Jiyong Park | 9231537 | 2021-04-02 08:45:46 +0900 | [diff] [blame] | 242 | var ( |
Jiyong Park | c702204 | 2021-04-15 16:53:05 +0900 | [diff] [blame] | 243 | SdkSpecNone = SdkSpec{SdkNone, NoneApiLevel, "(no version)"} |
Spandan Das | 15da588 | 2023-03-02 23:36:39 +0000 | [diff] [blame] | 244 | SdkSpecPrivate = SdkSpec{SdkPrivate, PrivateApiLevel, ""} |
Jiyong Park | c702204 | 2021-04-15 16:53:05 +0900 | [diff] [blame] | 245 | SdkSpecCorePlatform = SdkSpec{SdkCorePlatform, FutureApiLevel, "core_platform"} |
Jiyong Park | 9231537 | 2021-04-02 08:45:46 +0900 | [diff] [blame] | 246 | ) |
| 247 | |
| 248 | func SdkSpecFrom(ctx EarlyModuleContext, str string) SdkSpec { |
satayev | 0ee2f91 | 2021-12-01 17:39:48 +0000 | [diff] [blame] | 249 | return SdkSpecFromWithConfig(ctx.Config(), str) |
| 250 | } |
| 251 | |
| 252 | func SdkSpecFromWithConfig(config Config, str string) SdkSpec { |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 253 | switch str { |
| 254 | // special cases first |
| 255 | case "": |
Jiyong Park | 9231537 | 2021-04-02 08:45:46 +0900 | [diff] [blame] | 256 | return SdkSpecPrivate |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 257 | case "none": |
Jiyong Park | 9231537 | 2021-04-02 08:45:46 +0900 | [diff] [blame] | 258 | return SdkSpecNone |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 259 | case "core_platform": |
Jiyong Park | 9231537 | 2021-04-02 08:45:46 +0900 | [diff] [blame] | 260 | return SdkSpecCorePlatform |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 261 | default: |
| 262 | // the syntax is [kind_]version |
| 263 | sep := strings.LastIndex(str, "_") |
| 264 | |
| 265 | var kindString string |
| 266 | if sep == 0 { |
Spandan Das | 15da588 | 2023-03-02 23:36:39 +0000 | [diff] [blame] | 267 | return SdkSpec{SdkInvalid, NewInvalidApiLevel(str), str} |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 268 | } else if sep == -1 { |
| 269 | kindString = "" |
| 270 | } else { |
| 271 | kindString = str[0:sep] |
| 272 | } |
| 273 | versionString := str[sep+1 : len(str)] |
| 274 | |
| 275 | var kind SdkKind |
| 276 | switch kindString { |
| 277 | case "": |
| 278 | kind = SdkPublic |
| 279 | case "core": |
| 280 | kind = SdkCore |
| 281 | case "system": |
| 282 | kind = SdkSystem |
| 283 | case "test": |
| 284 | kind = SdkTest |
| 285 | case "module": |
| 286 | kind = SdkModule |
| 287 | case "system_server": |
| 288 | kind = SdkSystemServer |
| 289 | default: |
Jiyong Park | 54105c4 | 2021-03-31 18:17:53 +0900 | [diff] [blame] | 290 | return SdkSpec{SdkInvalid, NoneApiLevel, str} |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 291 | } |
| 292 | |
satayev | 0ee2f91 | 2021-12-01 17:39:48 +0000 | [diff] [blame] | 293 | apiLevel, err := ApiLevelFromUserWithConfig(config, versionString) |
Jiyong Park | 9231537 | 2021-04-02 08:45:46 +0900 | [diff] [blame] | 294 | if err != nil { |
Spandan Das | 15da588 | 2023-03-02 23:36:39 +0000 | [diff] [blame] | 295 | return SdkSpec{SdkInvalid, NewInvalidApiLevel(versionString), str} |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 296 | } |
Jiyong Park | 54105c4 | 2021-03-31 18:17:53 +0900 | [diff] [blame] | 297 | return SdkSpec{kind, apiLevel, str} |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 298 | } |
| 299 | } |
| 300 | |
| 301 | func (s SdkSpec) ValidateSystemSdk(ctx EarlyModuleContext) bool { |
| 302 | // Ensures that the specified system SDK version is one of BOARD_SYSTEMSDK_VERSIONS (for vendor/product Java module) |
| 303 | // Assuming that BOARD_SYSTEMSDK_VERSIONS := 28 29, |
| 304 | // sdk_version of the modules in vendor/product that use system sdk must be either system_28, system_29 or system_current |
Jiyong Park | 54105c4 | 2021-03-31 18:17:53 +0900 | [diff] [blame] | 305 | if s.Kind != SdkSystem || s.ApiLevel.IsPreview() { |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 306 | return true |
| 307 | } |
| 308 | allowedVersions := ctx.DeviceConfig().PlatformSystemSdkVersions() |
| 309 | if ctx.DeviceSpecific() || ctx.SocSpecific() || (ctx.ProductSpecific() && ctx.Config().EnforceProductPartitionInterface()) { |
| 310 | systemSdkVersions := ctx.DeviceConfig().SystemSdkVersions() |
| 311 | if len(systemSdkVersions) > 0 { |
| 312 | allowedVersions = systemSdkVersions |
| 313 | } |
| 314 | } |
Jiyong Park | 54105c4 | 2021-03-31 18:17:53 +0900 | [diff] [blame] | 315 | if len(allowedVersions) > 0 && !InList(s.ApiLevel.String(), allowedVersions) { |
Jiyong Park | f1691d2 | 2021-03-29 20:11:58 +0900 | [diff] [blame] | 316 | ctx.PropertyErrorf("sdk_version", "incompatible sdk version %q. System SDK version should be one of %q", |
| 317 | s.Raw, allowedVersions) |
| 318 | return false |
| 319 | } |
| 320 | return true |
| 321 | } |
Spandan Das | 6b73fcb | 2023-03-20 20:20:58 +0000 | [diff] [blame] | 322 | |
| 323 | func init() { |
| 324 | RegisterMakeVarsProvider(pctx, javaSdkMakeVars) |
| 325 | } |
| 326 | |
| 327 | // Export the name of the soong modules representing the various Java API surfaces. |
| 328 | func javaSdkMakeVars(ctx MakeVarsContext) { |
| 329 | ctx.Strict("ANDROID_PUBLIC_STUBS", SdkPublic.JavaLibraryName(ctx.Config())) |
| 330 | ctx.Strict("ANDROID_SYSTEM_STUBS", SdkSystem.JavaLibraryName(ctx.Config())) |
| 331 | ctx.Strict("ANDROID_TEST_STUBS", SdkTest.JavaLibraryName(ctx.Config())) |
| 332 | ctx.Strict("ANDROID_MODULE_LIB_STUBS", SdkModule.JavaLibraryName(ctx.Config())) |
| 333 | ctx.Strict("ANDROID_SYSTEM_SERVER_STUBS", SdkSystemServer.JavaLibraryName(ctx.Config())) |
| 334 | // TODO (jihoonkang): Create a .txt equivalent for core.current.stubs |
| 335 | ctx.Strict("ANDROID_CORE_STUBS", SdkCore.JavaLibraryName(ctx.Config())) |
| 336 | } |