aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorchangho.shin <changho.shin@lge.com>2019-08-08 18:37:17 +0900
committerMichael Bestas <mkbestas@lineageos.org>2019-12-11 19:03:32 +0200
commitc56ab05e72df96743b8911808227892e58b4f3bd (patch)
tree975449c9532ac99966ebfb13cc0bd74d6c5f8693 /java
parentf97beb5bfc36a76c752b078cf42c7283580eb6ef (diff)
downloadbuild_soong-c56ab05e72df96743b8911808227892e58b4f3bd.tar.gz
build_soong-c56ab05e72df96743b8911808227892e58b4f3bd.tar.bz2
build_soong-c56ab05e72df96743b8911808227892e58b4f3bd.zip
Add 'Additional_manifest' property to merge other manifests
This is equivalent to 'LOCAL_FULL_LIBS_MANIFEST_FILES' in Make. Fixes: 123374442 Test: m -j Change-Id: Ic4b40a08f2454687c74949020598651acea3b2dd
Diffstat (limited to 'java')
-rw-r--r--java/aar.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/java/aar.go b/java/aar.go
index a89c8f19..d0d746c0 100644
--- a/java/aar.go
+++ b/java/aar.go
@@ -69,6 +69,9 @@ type aaptProperties struct {
// path to AndroidManifest.xml. If unset, defaults to "AndroidManifest.xml".
Manifest *string `android:"path"`
+
+ // paths to additional manifest files to merge with main manifest.
+ Additional_manifests []string `android:"path"`
}
type aapt struct {
@@ -217,7 +220,11 @@ func (a *aapt) buildActions(ctx android.ModuleContext, sdkContext sdkContext, ex
a.transitiveManifestPaths = append(android.Paths{manifestPath}, transitiveStaticLibManifests...)
if len(transitiveStaticLibManifests) > 0 {
- a.mergedManifestFile = manifestMerger(ctx, manifestPath, transitiveStaticLibManifests, a.isLibrary)
+ // Merge additional manifest files with app manifest.
+ additionalManifests := android.PathsForModuleSrc(ctx, a.aaptProperties.Additional_manifests)
+ additionalManifests = append(additionalManifests, transitiveStaticLibManifests...)
+
+ a.mergedManifestFile = manifestMerger(ctx, manifestPath, additionalManifests, a.isLibrary)
if !a.isLibrary {
// Only use the merged manifest for applications. For libraries, the transitive closure of manifests
// will be propagated to the final application and merged there. The merged manifest for libraries is