Merge changes I9e38ac73,I9412147f am: 45da465ef6
am: 0a93afc2b9
am: 331599f461
am: 76df6461c5
am: 0d3522cece
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1887532 Change-Id: Ia74c51187284aad60b8e700c488a60a0083f4cfc
This commit is contained in:
@@ -47,6 +47,7 @@ func (library *Library) AndroidMkEntriesHostDex() android.AndroidMkEntries {
|
|||||||
if library.dexJarFile.IsSet() {
|
if library.dexJarFile.IsSet() {
|
||||||
entries.SetPath("LOCAL_SOONG_DEX_JAR", library.dexJarFile.Path())
|
entries.SetPath("LOCAL_SOONG_DEX_JAR", library.dexJarFile.Path())
|
||||||
}
|
}
|
||||||
|
entries.SetPath("LOCAL_SOONG_INSTALLED_MODULE", library.hostdexInstallFile)
|
||||||
entries.SetPath("LOCAL_SOONG_HEADER_JAR", library.headerJarFile)
|
entries.SetPath("LOCAL_SOONG_HEADER_JAR", library.headerJarFile)
|
||||||
entries.SetPath("LOCAL_SOONG_CLASSES_JAR", library.implementationAndResourcesJar)
|
entries.SetPath("LOCAL_SOONG_CLASSES_JAR", library.implementationAndResourcesJar)
|
||||||
entries.SetString("LOCAL_MODULE_STEM", library.Stem()+"-hostdex")
|
entries.SetString("LOCAL_MODULE_STEM", library.Stem()+"-hostdex")
|
||||||
|
@@ -474,6 +474,7 @@ func (a *AndroidApp) dexBuildActions(ctx android.ModuleContext) android.Path {
|
|||||||
a.dexpreopter.enforceUsesLibs = a.usesLibrary.enforceUsesLibraries()
|
a.dexpreopter.enforceUsesLibs = a.usesLibrary.enforceUsesLibraries()
|
||||||
a.dexpreopter.classLoaderContexts = a.classLoaderContexts
|
a.dexpreopter.classLoaderContexts = a.classLoaderContexts
|
||||||
a.dexpreopter.manifestFile = a.mergedManifestFile
|
a.dexpreopter.manifestFile = a.mergedManifestFile
|
||||||
|
a.dexpreopter.preventInstall = a.appProperties.PreventInstall
|
||||||
|
|
||||||
if ctx.ModuleName() != "framework-res" {
|
if ctx.ModuleName() != "framework-res" {
|
||||||
a.Module.compile(ctx, a.aaptSrcJar)
|
a.Module.compile(ctx, a.aaptSrcJar)
|
||||||
@@ -726,7 +727,9 @@ func (a *AndroidApp) generateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
apexInfo := ctx.Provider(android.ApexInfoProvider).(android.ApexInfo)
|
apexInfo := ctx.Provider(android.ApexInfoProvider).(android.ApexInfo)
|
||||||
|
|
||||||
// Install the app package.
|
// Install the app package.
|
||||||
if (Bool(a.Module.properties.Installable) || ctx.Host()) && apexInfo.IsForPlatform() {
|
if (Bool(a.Module.properties.Installable) || ctx.Host()) && apexInfo.IsForPlatform() &&
|
||||||
|
!a.appProperties.PreventInstall {
|
||||||
|
|
||||||
var extraInstalledPaths android.Paths
|
var extraInstalledPaths android.Paths
|
||||||
for _, extra := range a.extraOutputFiles {
|
for _, extra := range a.extraOutputFiles {
|
||||||
installed := ctx.InstallFile(a.installDir, extra.Base(), extra)
|
installed := ctx.InstallFile(a.installDir, extra.Base(), extra)
|
||||||
|
@@ -407,6 +407,9 @@ type Module struct {
|
|||||||
// installed file for binary dependency
|
// installed file for binary dependency
|
||||||
installFile android.Path
|
installFile android.Path
|
||||||
|
|
||||||
|
// installed file for hostdex copy
|
||||||
|
hostdexInstallFile android.InstallPath
|
||||||
|
|
||||||
// list of .java files and srcjars that was passed to javac
|
// list of .java files and srcjars that was passed to javac
|
||||||
compiledJavaSrcs android.Paths
|
compiledJavaSrcs android.Paths
|
||||||
compiledSrcJars android.Paths
|
compiledSrcJars android.Paths
|
||||||
|
@@ -66,6 +66,7 @@ type dexpreopter struct {
|
|||||||
isApp bool
|
isApp bool
|
||||||
isTest bool
|
isTest bool
|
||||||
isPresignedPrebuilt bool
|
isPresignedPrebuilt bool
|
||||||
|
preventInstall bool
|
||||||
|
|
||||||
manifestFile android.Path
|
manifestFile android.Path
|
||||||
statusFile android.WritablePath
|
statusFile android.WritablePath
|
||||||
@@ -356,7 +357,7 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Wr
|
|||||||
installDirOnDevice: installPath,
|
installDirOnDevice: installPath,
|
||||||
installFileOnDevice: installBase,
|
installFileOnDevice: installBase,
|
||||||
})
|
})
|
||||||
} else {
|
} else if !d.preventInstall {
|
||||||
ctx.InstallFile(installPath, installBase, install.From)
|
ctx.InstallFile(installPath, installBase, install.From)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -571,7 +571,8 @@ func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
}
|
}
|
||||||
hostDexNeeded := Bool(j.deviceProperties.Hostdex) && !ctx.Host()
|
hostDexNeeded := Bool(j.deviceProperties.Hostdex) && !ctx.Host()
|
||||||
if hostDexNeeded {
|
if hostDexNeeded {
|
||||||
ctx.InstallFile(android.PathForHostDexInstall(ctx, "framework"),
|
j.hostdexInstallFile = ctx.InstallFile(
|
||||||
|
android.PathForHostDexInstall(ctx, "framework"),
|
||||||
j.Stem()+"-hostdex.jar", j.outputFile)
|
j.Stem()+"-hostdex.jar", j.outputFile)
|
||||||
}
|
}
|
||||||
var installDir android.InstallPath
|
var installDir android.InstallPath
|
||||||
|
Reference in New Issue
Block a user