diff options
| author | Paul Duffin <paulduffin@google.com> | 2021-04-06 16:00:22 +0100 |
|---|---|---|
| committer | Paul Duffin <paulduffin@google.com> | 2021-04-07 20:39:13 +0100 |
| commit | f58fd9aec11b65ba7549c1638ab6522b15c75ff4 (patch) | |
| tree | 1d6459be1ae4e51b4c20019ec5144ad4525d13e0 /apex/apex_test.go | |
| parent | 2470467d42063facf025df129f6c1796024f30eb (diff) | |
Add deapexer support for apex_set
Bug: 181267622
Test: m droid
Change-Id: I630f9f2c33d037bf4a7011d2131a7d28f213ae8b
Diffstat (limited to 'apex/apex_test.go')
| -rw-r--r-- | apex/apex_test.go | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go index c507fb031..88aa5f97d 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -4605,6 +4605,40 @@ func TestBootDexJarsFromSourcesAndPrebuilts(t *testing.T) { `) }) + t.Run("apex_set only", func(t *testing.T) { + bp := ` + apex_set { + name: "myapex", + set: "myapex.apks", + exported_java_libs: ["libfoo", "libbar"], + } + + java_import { + name: "libfoo", + jars: ["libfoo.jar"], + apex_available: ["myapex"], + } + + java_sdk_library_import { + name: "libbar", + public: { + jars: ["libbar.jar"], + }, + apex_available: ["myapex"], + } + ` + + ctx := testDexpreoptWithApexes(t, bp, "", transform) + checkBootDexJarPath(t, ctx, "libfoo", "out/soong/.intermediates/myapex.deapexer/android_common/deapexer/javalib/libfoo.jar") + checkBootDexJarPath(t, ctx, "libbar", "out/soong/.intermediates/myapex.deapexer/android_common/deapexer/javalib/libbar.jar") + + // Make sure that the dex file from the apex_set contributes to the hiddenapi index file. + checkHiddenAPIIndexInputs(t, ctx, ` +.intermediates/libbar/android_common_myapex/hiddenapi/index.csv +.intermediates/libfoo/android_common_myapex/hiddenapi/index.csv +`) + }) + t.Run("prebuilt with source library preferred", func(t *testing.T) { bp := ` prebuilt_apex { |
