From 84c3807b9929e221085f76a78dea920a0b500d42 Mon Sep 17 00:00:00 2001 From: Pete Gillin Date: Thu, 9 Jul 2020 18:03:41 +0100 Subject: Enforce the legacy core/platform API restriction. This change silently decides whether modules which depend on either sdkPrivate or sdkCorePlatform get the legacy or the stable version of the core/platform API, based on whether the module's name is on a hard-coded list or not. Test: m java Test: make a target from the list when its entry is commented out, which correctly fails Bug: 157640067 Change-Id: I15e5a6c2f07e73718803501d705de0d7ab9bec90 Merged-In: I15e5a6c2f07e73718803501d705de0d7ab9bec90 Merged-In: Iaa97ddaa015e8079fcb3426585c5101c7ec9e22a (cherry picked from commit c0f4373106d6c205d11e3bbd61085736de7ec2df) --- java/sdk_test.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'java/sdk_test.go') diff --git a/java/sdk_test.go b/java/sdk_test.go index 1f23b140c..395da79df 100644 --- a/java/sdk_test.go +++ b/java/sdk_test.go @@ -49,8 +49,8 @@ func TestClasspath(t *testing.T) { }{ { name: "default", - bootclasspath: config.LegacyCorePlatformBootclasspathLibraries, - system: config.LegacyCorePlatformSystemModules, + bootclasspath: config.StableCorePlatformBootclasspathLibraries, + system: config.StableCorePlatformSystemModules, java8classpath: config.FrameworkLibraries, java9classpath: config.FrameworkLibraries, aidl: "-Iframework/aidl", @@ -58,16 +58,16 @@ func TestClasspath(t *testing.T) { { name: `sdk_version:"core_platform"`, properties: `sdk_version:"core_platform"`, - bootclasspath: config.LegacyCorePlatformBootclasspathLibraries, - system: config.LegacyCorePlatformSystemModules, + bootclasspath: config.StableCorePlatformBootclasspathLibraries, + system: config.StableCorePlatformSystemModules, java8classpath: []string{}, aidl: "", }, { name: "blank sdk version", properties: `sdk_version: "",`, - bootclasspath: config.LegacyCorePlatformBootclasspathLibraries, - system: config.LegacyCorePlatformSystemModules, + bootclasspath: config.StableCorePlatformBootclasspathLibraries, + system: config.StableCorePlatformSystemModules, java8classpath: config.FrameworkLibraries, java9classpath: config.FrameworkLibraries, aidl: "-Iframework/aidl", @@ -155,9 +155,9 @@ func TestClasspath(t *testing.T) { { name: "nostdlib system_modules", - 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"}, + properties: `sdk_version: "none", system_modules: "stable-core-platform-api-stubs-system-modules"`, + system: "stable-core-platform-api-stubs-system-modules", + bootclasspath: []string{"stable-core-platform-api-stubs-system-modules-lib"}, java8classpath: []string{}, }, { -- cgit v1.2.3-59-g8ed1b