Remove internal deapexer module

The build ations will be created by the top-level apex.

Details
1. In GenerateAndroidBuildActions, do a graph walk to determine if the
   apex has exported deps.
2. If there are exported deps, call the newly introduced `deapex`
   function. This registers the build rules and returns a DeapexerInfo
object. This was previously provided by the internal deapexer
dependency.
3. Update `dexpreoptSystemServerJars and `provideApexExportsInfo` to use
   the DeapexerInfo object from (2).

A lot of unit tests that relied on the legacy mechanism of deapexing
have been updated.

Test: go test ./apex
Test: lunch cf_x86_64_phone-next-userdebug (uses mainline prebuilts)
Test: verified no diff in file_list.txt
Bug: 368337090
Change-Id: I0edb681beccac4d2a9ceb73f9a506c081a8a96e0
This commit is contained in:
Spandan Das
2024-09-20 01:09:48 +00:00
parent a326b320ab
commit 52c01a1897
9 changed files with 126 additions and 234 deletions

View File

@@ -278,7 +278,6 @@ func TestPrebuiltSystemserverclasspathFragmentContents(t *testing.T) {
`all_apex_contributions`,
`dex2oatd`,
`prebuilt_myapex.apex.selector`,
`prebuilt_myapex.deapexer`,
`prebuilt_mysystemserverclasspathfragment`,
})
@@ -286,10 +285,9 @@ func TestPrebuiltSystemserverclasspathFragmentContents(t *testing.T) {
`all_apex_contributions`,
`prebuilt_bar`,
`prebuilt_foo`,
`prebuilt_myapex.deapexer`,
})
ensureExactDeapexedContents(t, ctx, "prebuilt_myapex", "android_common", []string{
ensureExactDeapexedContents(t, ctx, "myapex", "android_common_myapex", []string{
"javalib/foo.jar",
"javalib/bar.jar",
"javalib/bar.jar.prof",
@@ -439,10 +437,9 @@ func TestPrebuiltStandaloneSystemserverclasspathFragmentContents(t *testing.T) {
`all_apex_contributions`,
`prebuilt_bar`,
`prebuilt_foo`,
`prebuilt_myapex.deapexer`,
})
ensureExactDeapexedContents(t, ctx, "prebuilt_myapex", "android_common", []string{
ensureExactDeapexedContents(t, ctx, "myapex", "android_common_myapex", []string{
"javalib/foo.jar",
"javalib/bar.jar",
"javalib/bar.jar.prof",