diff options
| author | 2020-06-09 13:20:31 +0000 | |
|---|---|---|
| committer | 2020-06-09 13:20:31 +0000 | |
| commit | d7db79cc8b7cc2dbde919d95297b8dd917e7e831 (patch) | |
| tree | 3b3baf0b6a1b051a57e1e1dc113e4c709056eab1 /java | |
| parent | 4e372f7841c1b80178fa91110b34018d7e4d7ae8 (diff) | |
| parent | 1f41dbff6434deac5c41047f34ed7d5d288e5497 (diff) | |
Merge "Split the core/platform API into stable and legacy versions."
Diffstat (limited to 'java')
| -rw-r--r-- | java/config/config.go | 5 | ||||
| -rw-r--r-- | java/hiddenapi_singleton.go | 2 | ||||
| -rw-r--r-- | java/java.go | 5 | ||||
| -rw-r--r-- | java/sdk_test.go | 6 | ||||
| -rw-r--r-- | java/testing.go | 19 |
5 files changed, 20 insertions, 17 deletions
diff --git a/java/config/config.go b/java/config/config.go index edaed2a10..bb5be3aca 100644 --- a/java/config/config.go +++ b/java/config/config.go @@ -28,8 +28,9 @@ import ( var ( pctx = android.NewPackageContext("android/soong/java/config") - DefaultBootclasspathLibraries = []string{"core.platform.api.stubs", "core-lambda-stubs"} - DefaultSystemModules = "core-platform-api-stubs-system-modules" + // TODO(b/157640067): Don't depend on the legacy API by default in the long term. + DefaultBootclasspathLibraries = []string{"legacy.core.platform.api.stubs", "core-lambda-stubs"} + DefaultSystemModules = "legacy-core-platform-api-stubs-system-modules" DefaultLibraries = []string{"ext", "framework"} DefaultLambdaStubsLibrary = "core-lambda-stubs" SdkLambdaStubsPath = "prebuilts/sdk/tools/core-lambda-stubs.jar" diff --git a/java/hiddenapi_singleton.go b/java/hiddenapi_singleton.go index 2f35798b5..bff591cb0 100644 --- a/java/hiddenapi_singleton.go +++ b/java/hiddenapi_singleton.go @@ -116,7 +116,7 @@ func stubFlagsRule(ctx android.SingletonContext) { // Core Platform API stubs corePlatformStubModules := []string{ - "core.platform.api.stubs", + "legacy.core.platform.api.stubs", } // Allow products to define their own stubs for custom product jars that apps can use. diff --git a/java/java.go b/java/java.go index 0ba1f5a7a..af68e56b7 100644 --- a/java/java.go +++ b/java/java.go @@ -837,8 +837,9 @@ type linkTypeContext interface { func (m *Module) getLinkType(name string) (ret linkType, stubs bool) { switch name { - case "core.current.stubs", "core.platform.api.stubs", "stub-annotations", - "private-stub-annotations-jar", "core-lambda-stubs", "core-generated-annotation-stubs": + case "core.current.stubs", "legacy.core.platform.api.stubs", "stable.core.platform.api.stubs", + "stub-annotations", "private-stub-annotations-jar", + "core-lambda-stubs", "core-generated-annotation-stubs": return javaCore, true case "android_stubs_current": return javaSdk, true diff --git a/java/sdk_test.go b/java/sdk_test.go index 52d2df552..e5d322c58 100644 --- a/java/sdk_test.go +++ b/java/sdk_test.go @@ -156,9 +156,9 @@ func TestClasspath(t *testing.T) { { name: "nostdlib system_modules", - properties: `sdk_version: "none", system_modules: "core-platform-api-stubs-system-modules"`, - system: "core-platform-api-stubs-system-modules", - bootclasspath: []string{"core-platform-api-stubs-system-modules-lib"}, + properties: `sdk_version: "none", system_modules: "legacy-core-platform-api-stubs-system-modules"`, + system: "legacy-core-platform-api-stubs-system-modules", + bootclasspath: []string{"legacy-core-platform-api-stubs-system-modules-lib"}, java8classpath: []string{}, }, { diff --git a/java/testing.go b/java/testing.go index faf4d32b4..f993f56b3 100644 --- a/java/testing.go +++ b/java/testing.go @@ -173,7 +173,8 @@ func GatherRequiredDepsForTest() string { "android_module_lib_stubs_current", "android_system_server_stubs_current", "core.current.stubs", - "core.platform.api.stubs", + "legacy.core.platform.api.stubs", + "stable.core.platform.api.stubs", "kotlin-stdlib", "kotlin-stdlib-jdk7", "kotlin-stdlib-jdk8", @@ -186,7 +187,7 @@ func GatherRequiredDepsForTest() string { name: "%s", srcs: ["a.java"], sdk_version: "none", - system_modules: "core-platform-api-stubs-system-modules", + system_modules: "legacy-core-platform-api-stubs-system-modules", } `, extra) } @@ -196,7 +197,7 @@ func GatherRequiredDepsForTest() string { name: "framework", srcs: ["a.java"], sdk_version: "none", - system_modules: "core-platform-api-stubs-system-modules", + system_modules: "legacy-core-platform-api-stubs-system-modules", aidl: { export_include_dirs: ["framework/aidl"], }, @@ -211,7 +212,7 @@ func GatherRequiredDepsForTest() string { name: "android.hidl.base-V1.0-java", srcs: ["a.java"], sdk_version: "none", - system_modules: "core-platform-api-stubs-system-modules", + system_modules: "legacy-core-platform-api-stubs-system-modules", installable: true, } @@ -219,7 +220,7 @@ func GatherRequiredDepsForTest() string { name: "android.hidl.manager-V1.0-java", srcs: ["a.java"], sdk_version: "none", - system_modules: "core-platform-api-stubs-system-modules", + system_modules: "legacy-core-platform-api-stubs-system-modules", installable: true, } @@ -227,7 +228,7 @@ func GatherRequiredDepsForTest() string { name: "org.apache.http.legacy", srcs: ["a.java"], sdk_version: "none", - system_modules: "core-platform-api-stubs-system-modules", + system_modules: "legacy-core-platform-api-stubs-system-modules", installable: true, } @@ -235,7 +236,7 @@ func GatherRequiredDepsForTest() string { name: "android.test.base", srcs: ["a.java"], sdk_version: "none", - system_modules: "core-platform-api-stubs-system-modules", + system_modules: "legacy-core-platform-api-stubs-system-modules", installable: true, } @@ -243,14 +244,14 @@ func GatherRequiredDepsForTest() string { name: "android.test.mock", srcs: ["a.java"], sdk_version: "none", - system_modules: "core-platform-api-stubs-system-modules", + system_modules: "legacy-core-platform-api-stubs-system-modules", installable: true, } ` systemModules := []string{ "core-current-stubs-system-modules", - "core-platform-api-stubs-system-modules", + "legacy-core-platform-api-stubs-system-modules", } for _, extra := range systemModules { |