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
This commit is contained in:
@@ -28,6 +28,7 @@ func TestPrebuiltApis_SystemModulesCreation(t *testing.T) {
|
||||
prepareForJavaTest,
|
||||
FixtureWithPrebuiltApis(map[string][]string{
|
||||
"31": {},
|
||||
"32": {},
|
||||
"current": {},
|
||||
}),
|
||||
).RunTest(t)
|
||||
@@ -44,8 +45,11 @@ func TestPrebuiltApis_SystemModulesCreation(t *testing.T) {
|
||||
// 31 only has public system modules.
|
||||
"sdk_public_31_system_modules",
|
||||
|
||||
// current only has public system modules.
|
||||
// 32 and current both have public and module-lib system modules.
|
||||
"sdk_public_32_system_modules",
|
||||
"sdk_module-lib_32_system_modules",
|
||||
"sdk_public_current_system_modules",
|
||||
"sdk_module-lib_current_system_modules",
|
||||
}
|
||||
sort.Strings(expected)
|
||||
android.AssertArrayString(t, "sdk system modules", expected, sdkSystemModules)
|
||||
|
Reference in New Issue
Block a user