diff options
| author | 2019-06-17 21:24:33 +0000 | |
|---|---|---|
| committer | 2019-06-17 21:24:33 +0000 | |
| commit | 33ee25466f752420ba42f899457b37f402459005 (patch) | |
| tree | b985f857c29e0cee58c6b1a5f07e8ccd744890cb /java/sdk.go | |
| parent | 2deb017c04d1982e39dcaef7b96c524c6f493388 (diff) | |
| parent | 50c217c744901bf8a2408f110840bf22225ae361 (diff) | |
Merge changes I42cb181f,I6413c9b1
* changes:
Add sdk_version:"core_platform" to replace no_framework_libs:true
Remove the no_standard_libs property
Diffstat (limited to 'java/sdk.go')
| -rw-r--r-- | java/sdk.go | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/java/sdk.go b/java/sdk.go index 9dfb38bf4..6ffe399fb 100644 --- a/java/sdk.go +++ b/java/sdk.go @@ -45,16 +45,13 @@ type sdkContext interface { // targetSdkVersion returns the target_sdk_version property of the current module, or sdkVersion() if it is not set. targetSdkVersion() string - // Temporarily provide access to the no_standard_libs property (where present). - noStandardLibs() bool - // Temporarily provide access to the no_frameworks_libs property (where present). noFrameworkLibs() bool } func sdkVersionOrDefault(ctx android.BaseModuleContext, v string) string { switch v { - case "", "none", "current", "system_current", "test_current", "core_current": + case "", "none", "current", "test_current", "system_current", "core_current", "core_platform": return ctx.Config().DefaultAppTargetSdk() default: return v @@ -65,7 +62,7 @@ func sdkVersionOrDefault(ctx android.BaseModuleContext, v string) string { // it returns android.FutureApiLevel (10000). func sdkVersionToNumber(ctx android.BaseModuleContext, v string) (int, error) { switch v { - case "", "none", "current", "test_current", "system_current", "core_current": + case "", "none", "current", "test_current", "system_current", "core_current", "core_platform": return ctx.Config().DefaultAppTargetSdkInt(), nil default: n := android.GetNumericSdkVersion(v) @@ -145,8 +142,7 @@ func decodeSdkDep(ctx android.BaseModuleContext, sdkContext sdkContext) sdkDep { jars: android.Paths{jarPath.Path(), lambdaStubsPath}, aidl: android.OptionalPathForPath(aidlPath.Path()), - // Pass values straight through for now to match previous behavior. - noStandardLibs: sdkContext.noStandardLibs(), + // Pass value straight through for now to match previous behavior. noFrameworksLibs: sdkContext.noFrameworkLibs(), } } @@ -159,8 +155,7 @@ func decodeSdkDep(ctx android.BaseModuleContext, sdkContext sdkContext) sdkDep { frameworkResModule: r, aidl: android.OptionalPathForPath(aidl), - // Pass values straight through for now to match previous behavior. - noStandardLibs: sdkContext.noStandardLibs(), + // Pass value straight through for now to match previous behavior. noFrameworksLibs: sdkContext.noFrameworkLibs(), } @@ -187,7 +182,8 @@ func decodeSdkDep(ctx android.BaseModuleContext, sdkContext sdkContext) sdkDep { } } - if ctx.Config().UnbundledBuildUsePrebuiltSdks() && v != "" && v != "none" { + if ctx.Config().UnbundledBuildUsePrebuiltSdks() && + v != "" && v != "none" && v != "core_platform" { return toPrebuilt(v) } @@ -197,14 +193,19 @@ func decodeSdkDep(ctx android.BaseModuleContext, sdkContext sdkContext) sdkDep { useDefaultLibs: true, frameworkResModule: "framework-res", - // Pass values straight through for now to match previous behavior. - noStandardLibs: sdkContext.noStandardLibs(), + // Pass value straight through for now to match previous behavior. noFrameworksLibs: sdkContext.noFrameworkLibs(), } case "none": return sdkDep{ noStandardLibs: true, } + case "core_platform": + return sdkDep{ + useDefaultLibs: true, + frameworkResModule: "framework-res", + noFrameworksLibs: true, + } case "current": return toModule("android_stubs_current", "framework-res", sdkFrameworkAidlPath(ctx)) case "system_current": |