From 880f964f168916f518ac47c964173ad3a167348b Mon Sep 17 00:00:00 2001 From: Pete Gillin Date: Wed, 1 Jul 2020 13:17:16 +0100 Subject: [PATCH] Tidy up the definition of sdkCore. Compared to the effect of the toModule function, this (a) sets noFrameworkLibs to true, which seems logically correct, and (b) stops setting java9Classpath, which was redundant since the same stubs are available in 1.9+ builds via the systemModules setting. (This brings sdkCore into line with sdkCorePlatform in both cases.) Test: m art.module.api.annotations Change-Id: I61a868bc363a3bf174725b78c0a1657021cfe08a --- java/sdk.go | 7 ++++++- java/sdk_test.go | 9 ++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/java/sdk.go b/java/sdk.go index e3472cea3..1aac67b53 100644 --- a/java/sdk.go +++ b/java/sdk.go @@ -449,7 +449,12 @@ func decodeSdkDep(ctx android.EarlyModuleContext, sdkContext sdkContext) sdkDep case sdkTest: return toModule([]string{"android_test_stubs_current"}, "framework-res", sdkFrameworkAidlPath(ctx)) case sdkCore: - return toModule([]string{"core.current.stubs"}, "", nil) + return sdkDep{ + useModule: true, + bootclasspath: []string{"core.current.stubs", config.DefaultLambdaStubsLibrary}, + systemModules: "core-current-stubs-system-modules", + noFrameworksLibs: true, + } case sdkModule: // TODO(146757305): provide .apk and .aidl that have more APIs for modules return toModule([]string{"android_module_lib_stubs_current"}, "framework-res", nonUpdatableFrameworkAidlPath(ctx)) diff --git a/java/sdk_test.go b/java/sdk_test.go index 773a70c9e..1f23b140c 100644 --- a/java/sdk_test.go +++ b/java/sdk_test.go @@ -139,11 +139,10 @@ func TestClasspath(t *testing.T) { }, { - name: "core_current", - properties: `sdk_version: "core_current",`, - bootclasspath: []string{"core.current.stubs", "core-lambda-stubs"}, - system: "core-current-stubs-system-modules", - java9classpath: []string{"core.current.stubs"}, + name: "core_current", + properties: `sdk_version: "core_current",`, + bootclasspath: []string{"core.current.stubs", "core-lambda-stubs"}, + system: "core-current-stubs-system-modules", }, {