Call PackageFile for dexpreopt files of APEX bundles.
Soong generates AndroidMk modules and Make installs the required dexpreopt files for APEX bundles. This dependency is not tracked by the soong and missing from the soong filesystem. Call PackageFile for the dexpreopt files of APEX bundles to install the files in the soong-built system image. Bug: 346439786 Test: lunch aosp_cf_x86_64_phone-trunk_staging-userdebug \ && m aosp_cf_system_x86_64 Change-Id: I6af4afe5b3183c89bf687ac779007b87e1d7e948
This commit is contained in:
@@ -1677,12 +1677,12 @@ var _ javaModule = (*java.DexImport)(nil)
|
||||
var _ javaModule = (*java.SdkLibraryImport)(nil)
|
||||
|
||||
// apexFileForJavaModule creates an apexFile for a java module's dex implementation jar.
|
||||
func apexFileForJavaModule(ctx android.BaseModuleContext, module javaModule) apexFile {
|
||||
func apexFileForJavaModule(ctx android.ModuleContext, module javaModule) apexFile {
|
||||
return apexFileForJavaModuleWithFile(ctx, module, module.DexJarBuildPath(ctx).PathOrNil())
|
||||
}
|
||||
|
||||
// apexFileForJavaModuleWithFile creates an apexFile for a java module with the supplied file.
|
||||
func apexFileForJavaModuleWithFile(ctx android.BaseModuleContext, module javaModule, dexImplementationJar android.Path) apexFile {
|
||||
func apexFileForJavaModuleWithFile(ctx android.ModuleContext, module javaModule, dexImplementationJar android.Path) apexFile {
|
||||
dirInApex := "javalib"
|
||||
af := newApexFile(ctx, dexImplementationJar, module.BaseModuleName(), dirInApex, javaSharedLib, module)
|
||||
af.jacocoReportClassesFile = module.JacocoReportClassesFile()
|
||||
@@ -1693,10 +1693,12 @@ func apexFileForJavaModuleWithFile(ctx android.BaseModuleContext, module javaMod
|
||||
if sdkLib, ok := module.(*java.SdkLibrary); ok {
|
||||
for _, install := range sdkLib.BuiltInstalledForApex() {
|
||||
af.requiredModuleNames = append(af.requiredModuleNames, install.FullModuleName())
|
||||
install.PackageFile(ctx)
|
||||
}
|
||||
} else if dexpreopter, ok := module.(java.DexpreopterInterface); ok {
|
||||
for _, install := range dexpreopter.DexpreoptBuiltInstalledForApex() {
|
||||
af.requiredModuleNames = append(af.requiredModuleNames, install.FullModuleName())
|
||||
install.PackageFile(ctx)
|
||||
}
|
||||
}
|
||||
return af
|
||||
|
Reference in New Issue
Block a user