Merge "Allow apex module to have android_app_set as its constituent." am: a5c94e1409 am: 342b4810a7

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1318079

Change-Id: If27ef9b94e59620abcf2ef1179f51c2e5ca9b10f
This commit is contained in:
Treehugger Robot
2020-06-05 06:22:41 +00:00
committed by Automerger Merge Worker
6 changed files with 135 additions and 58 deletions

View File

@@ -1150,6 +1150,7 @@ const (
javaSharedLib
nativeTest
app
appSet
)
func (class apexFileClass) NameInMake() string {
@@ -1164,7 +1165,7 @@ func (class apexFileClass) NameInMake() string {
return "JAVA_LIBRARIES"
case nativeTest:
return "NATIVE_TESTS"
case app:
case app, appSet:
// b/142537672 Why isn't this APP? We want to have full control over
// the paths and file names of the apk file under the flattend APEX.
// If this is set to APP, then the paths and file names are modified
@@ -2026,6 +2027,15 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) {
filesInfo = append(filesInfo, apexFileForAndroidApp(ctx, ap))
} else if ap, ok := child.(*java.AndroidTestHelperApp); ok {
filesInfo = append(filesInfo, apexFileForAndroidApp(ctx, ap))
} else if ap, ok := child.(*java.AndroidAppSet); ok {
appDir := "app"
if ap.Privileged() {
appDir = "priv-app"
}
af := newApexFile(ctx, ap.OutputFile(), ap.Name(),
filepath.Join(appDir, ap.BaseModuleName()), appSet, ap)
af.certificate = java.PresignedCertificate
filesInfo = append(filesInfo, af)
} else {
ctx.PropertyErrorf("apps", "%q is not an android_app module", depName)
}