diff options
author | 2025-01-28 14:00:12 -0800 | |
---|---|---|
committer | 2025-02-03 22:19:24 -0800 | |
commit | 388c6618a8a4a5bedd42ffc4874e2f6663e01289 (patch) | |
tree | dc1947fc3a719fcc9bc8824eb963ec004345e878 /apex/apex_test.go | |
parent | 90d7df966c7c79a5d0c7380d4d3dc59bd339baad (diff) |
Move installation of dexpreopted system server classpath libraries into apex
System server jars in apexes currently use a heuristic to determine
whether or not they are the "main" variant in order to create rules
that copy their dexpreopt artifacts to the final installed location
and their dex jars to a known location for other modules to reference.
The heuristic depends on knowing all apexes that depend on the
module, which will not be possible when the apex info mutator is
rewritten to support future incremental analysis.
Instead, export the dexpreopt artifacts and dex jars, and let the
apex decide whether or not to install them.
Bug: 372543712
Test: all soong tests pass
Change-Id: I478bc2edceca4614e08e9a695b05d091e5437ba1
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r-- | apex/apex_test.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go index a5b66c10e..1382f6903 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -9803,7 +9803,16 @@ func TestAndroidMk_DexpreoptBuiltInstalledForApex(t *testing.T) { var builder strings.Builder data.Custom(&builder, apexBundle.BaseModuleName(), "TARGET_", "", data) androidMk := builder.String() - ensureContains(t, androidMk, "LOCAL_REQUIRED_MODULES := foo.myapex foo-dexpreopt-arm64-apex@myapex@javalib@foo.jar@classes.odex foo-dexpreopt-arm64-apex@myapex@javalib@foo.jar@classes.vdex\n") + out := ctx.Config().OutDir() + ensureContains(t, androidMk, "LOCAL_SOONG_INSTALL_PAIRS += "+ + filepath.Join(out, "soong/.intermediates/foo/android_common_apex10000/dexpreopt/foo/oat/arm64/javalib.odex")+ + ":"+ + filepath.Join(out, "target/product/test_device/system/framework/oat/arm64/apex@myapex@javalib@foo.jar@classes.odex")+ + " "+ + filepath.Join(out, "soong/.intermediates/foo/android_common_apex10000/dexpreopt/foo/oat/arm64/javalib.vdex")+ + ":"+ + filepath.Join(out, "target/product/test_device/system/framework/oat/arm64/apex@myapex@javalib@foo.jar@classes.vdex")+ + "\n") } func TestAndroidMk_RequiredModules(t *testing.T) { |