Add dont_merge_manifests attribute to android_test

Bug: 122332514
Test: treehugger, convert cts/tests/tests/content
Change-Id: Ib66fcafd7c31913402cd390dfecce292b1817729
This commit is contained in:
Sasha Smundak
2019-10-28 15:50:06 -07:00
parent 05491b4861
commit 541056c3fa
2 changed files with 5 additions and 1 deletions

View File

@@ -72,6 +72,9 @@ type aaptProperties struct {
// paths to additional manifest files to merge with main manifest.
Additional_manifests []string `android:"path"`
// do not include AndroidManifest from dependent libraries
Dont_merge_manifests *bool
}
type aapt struct {
@@ -225,7 +228,7 @@ func (a *aapt) buildActions(ctx android.ModuleContext, sdkContext sdkContext, ex
a.transitiveManifestPaths = append(android.Paths{manifestPath}, additionalManifests...)
a.transitiveManifestPaths = append(a.transitiveManifestPaths, transitiveStaticLibManifests...)
if len(a.transitiveManifestPaths) > 1 {
if len(a.transitiveManifestPaths) > 1 && !Bool(a.aaptProperties.Dont_merge_manifests) {
a.mergedManifestFile = manifestMerger(ctx, a.transitiveManifestPaths[0], a.transitiveManifestPaths[1:], a.isLibrary)
if !a.isLibrary {
// Only use the merged manifest for applications. For libraries, the transitive closure of manifests