Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 657615e0 authored by Alexander Smundak's avatar Alexander Smundak Committed by Gerrit Code Review
Browse files

Merge "Add dont_merge_manifests attribute to android_test"

parents 4f45daf9 541056c3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -198,6 +198,7 @@ func init() {
			"LOCAL_EXPORT_PACKAGE_RESOURCES":   "export_package_resources",
			"LOCAL_PRIVILEGED_MODULE":          "privileged",
			"LOCAL_AAPT_INCLUDE_ALL_RESOURCES": "aapt_include_all_resources",
			"LOCAL_DONT_MERGE_MANIFESTS":       "dont_merge_manifests",
			"LOCAL_USE_EMBEDDED_NATIVE_LIBS":   "use_embedded_native_libs",
			"LOCAL_USE_EMBEDDED_DEX":           "use_embedded_dex",

+4 −1
Original line number Diff line number Diff line
@@ -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