From 190fdef29458dc6fa604fa836cbe4ac51bf510d0 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Mon, 26 Apr 2021 10:33:59 +0100 Subject: Delegate retrieval of dex boot jar for apex to the bootclasspath_fragment The dex boot jar for the apex must have had hidden API flags encoded into it. Currently, the hidden API processing is done within the java modules themselves so the apex gets the dex boot jar from them. However, as part of the hidden API modularization work the hidden API encoding will be performed by the bootclasspath_fragment so this change prepares for that by delegating the retrieval of the dex boot jars to the bootclasspath_fragment, via BootclasspathFragmentApexContentInfo. For the moment that simply delegates straight back to the java module so this change does not change the build. It will however make it easier to switch hidden API encoding to the bootclasspath_fragment in future. Bug: 179354495 Test: m com.android.art - verify that this change does not change its contents Change-Id: I12eba333749be976bcc72661bb9d6be6cc3c56e3 --- java/bootclasspath_fragment.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'java/bootclasspath_fragment.go') diff --git a/java/bootclasspath_fragment.go b/java/bootclasspath_fragment.go index 00d465992..90383af60 100644 --- a/java/bootclasspath_fragment.go +++ b/java/bootclasspath_fragment.go @@ -198,6 +198,15 @@ func (i BootclasspathFragmentApexContentInfo) AndroidBootImageFilesByArchType() return files } +// DexBootJarPathForContentModule returns the path to the dex boot jar for specified module. +// +// The dex boot jar is one which has had hidden API encoding performed on it. +func (i BootclasspathFragmentApexContentInfo) DexBootJarPathForContentModule(module android.Module) android.Path { + j := module.(UsesLibraryDependency) + dexJar := j.DexJarBuildPath() + return dexJar +} + func (b *BootclasspathFragmentModule) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool { tag := ctx.OtherModuleDependencyTag(dep) if IsBootclasspathFragmentContentDepTag(tag) { -- cgit v1.2.3-59-g8ed1b