Remove deapex support from java_*_import

prebuilt_apex/apex_set currently supports its deapexed contents to be
returned via a sibling java_import/java_sdk_import module. This is
necesssary for
1. dexpreopt/hiddenapi processing
2. usage as shared library

(1) is no longer necessary. this information is provided by the
top-level prebuilt apexes now

(2) is no longer possible since `exported_java_libs` has been removed in
https://r.android.com/3272110

This CL uses a hack for java_sdk_library_improt. Even though (1) is
provided by the top-level apex, there are still some places where
dexpreopt/hiddenapi processing visits the import modules. This CL uses
a bogus path to make analysis work. If this bogus path gets used, there
will be an error during ninja execution

Test: go test ./apex
Test: in internal lunch cf_x86_64_phone-next-userdebug (uses mainline
prebuilts)
Test: verified that file_list.txt is same
Bug: 368337090

Change-Id: I0ea2327f648f0fc60e337b232f7265e140772ffd
This commit is contained in:
Spandan Das
2024-09-19 21:02:52 +00:00
parent f771470d8c
commit a326b320ab
4 changed files with 25 additions and 276 deletions

View File

@@ -204,7 +204,19 @@ java_import {
.intermediates/mysdk/common_os/empty -> java_boot_libs/snapshot/jars/are/invalid/core1.jar
.intermediates/mysdk/common_os/empty -> java_boot_libs/snapshot/jars/are/invalid/core2.jar
`),
snapshotTestPreparer(checkSnapshotWithoutSource, preparerForSnapshot),
snapshotTestPreparer(checkSnapshotWithoutSource, android.GroupFixturePreparers(
preparerForSnapshot,
// Flag ART prebuilts
android.FixtureMergeMockFs(android.MockFS{
"apex_contributions/Android.bp": []byte(`
apex_contributions {
name: "prebuilt_art_contributions",
contents: ["prebuilt_com.android.art"],
api_domain: "com.android.art",
}
`)}),
android.PrepareForTestWithBuildFlag("RELEASE_APEX_CONTRIBUTIONS_ART", "prebuilt_art_contributions"),
)),
// Check the behavior of the snapshot without the source.
snapshotTestChecker(checkSnapshotWithoutSource, func(t *testing.T, result *android.TestResult) {