From 004547facd2b7d95cbd757a7bb076ac1c1b82ab9 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Fri, 29 Oct 2021 13:50:24 +0100 Subject: Use module-lib system modules when building from prebuilts When building from source the build uses the java system modules for the public or module APIs as needed. However, previously when building from prebuilts it would always use the public API. That difference lead to build failures when building from prebuilts. This change makes the selection of java system modules when building from prebuilts consistent with the selection when building from sources. As API levels 30 and 31 (which are the only previous releases to provide system modules) did not provide separate java system modules for the module-lib API those levels always use the public APIs. Bug: 204189791 Test: - before applying these change m TARGET_BUILD_APPS=framework-connectivity - build fails with compilation error due to missing module APIs m sdk dist cp out/dist/system-modules/module-lib/core-for-system-modules.jar prebuilts/sdk/current/module-lib/core-for-system-modules.jar - apply these changes m TARGET_BUILD_APPS=framework-connectivity - build passes as expected Change-Id: Id113ff014e7892b1009fbcaad89b1ae23a7c3b79 --- java/sdk_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'java/sdk_test.go') diff --git a/java/sdk_test.go b/java/sdk_test.go index 9a711922c..5c4a6d244 100644 --- a/java/sdk_test.go +++ b/java/sdk_test.go @@ -304,7 +304,7 @@ func TestClasspath(t *testing.T) { name: "module_current", properties: `sdk_version: "module_current",`, bootclasspath: []string{`""`}, - system: "sdk_public_current_system_modules", + system: "sdk_module-lib_current_system_modules", java8classpath: []string{"prebuilts/sdk/current/module-lib/android.jar", "prebuilts/sdk/tools/core-lambda-stubs.jar"}, java9classpath: []string{"prebuilts/sdk/current/module-lib/android.jar", "prebuilts/sdk/tools/core-lambda-stubs.jar"}, aidl: "-pprebuilts/sdk/current/public/framework.aidl", @@ -331,7 +331,7 @@ func TestClasspath(t *testing.T) { name: "module_32", properties: `sdk_version: "module_32",`, bootclasspath: []string{`""`}, - system: "sdk_public_32_system_modules", + system: "sdk_module-lib_32_system_modules", java8classpath: []string{"prebuilts/sdk/32/module-lib/android.jar", "prebuilts/sdk/tools/core-lambda-stubs.jar"}, java9classpath: []string{"prebuilts/sdk/32/module-lib/android.jar", "prebuilts/sdk/tools/core-lambda-stubs.jar"}, aidl: "-pprebuilts/sdk/32/public/framework.aidl", @@ -354,7 +354,7 @@ func TestClasspath(t *testing.T) { name: "system_server_current", properties: `sdk_version: "system_server_current",`, bootclasspath: []string{`""`}, - system: "sdk_public_current_system_modules", + system: "sdk_module-lib_current_system_modules", java8classpath: []string{"prebuilts/sdk/current/system-server/android.jar", "prebuilts/sdk/tools/core-lambda-stubs.jar"}, java9classpath: []string{"prebuilts/sdk/current/system-server/android.jar", "prebuilts/sdk/tools/core-lambda-stubs.jar"}, aidl: "-pprebuilts/sdk/current/public/framework.aidl", @@ -381,7 +381,7 @@ func TestClasspath(t *testing.T) { name: "system_server_32", properties: `sdk_version: "system_server_32",`, bootclasspath: []string{`""`}, - system: "sdk_public_32_system_modules", + system: "sdk_module-lib_32_system_modules", java8classpath: []string{"prebuilts/sdk/32/system-server/android.jar", "prebuilts/sdk/tools/core-lambda-stubs.jar"}, java9classpath: []string{"prebuilts/sdk/32/system-server/android.jar", "prebuilts/sdk/tools/core-lambda-stubs.jar"}, aidl: "-pprebuilts/sdk/32/public/framework.aidl", -- cgit v1.2.3-59-g8ed1b