diff options
author | changho.shin <changho.shin@lge.com> | 2019-08-08 18:37:17 +0900 |
---|---|---|
committer | Changho Shin <changho.shin@lge.com> | 2019-08-13 08:30:00 +0000 |
commit | b5432b7a3d7656f9f15d9e003da134477ebe5b56 (patch) | |
tree | a25d1c3b65d994ab22556b219a7876584d864d89 | |
parent | 02ed5df4aca361954383c85b3f23c0693f6edc92 (diff) | |
download | build_soong-b5432b7a3d7656f9f15d9e003da134477ebe5b56.tar.gz build_soong-b5432b7a3d7656f9f15d9e003da134477ebe5b56.tar.bz2 build_soong-b5432b7a3d7656f9f15d9e003da134477ebe5b56.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
-rw-r--r-- | androidmk/cmd/androidmk/android.go | 2 | ||||
-rw-r--r-- | java/aar.go | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go index 2def179a..fcadd035 100644 --- a/androidmk/cmd/androidmk/android.go +++ b/androidmk/cmd/androidmk/android.go @@ -173,6 +173,8 @@ func init() { // Jacoco filters: "LOCAL_JACK_COVERAGE_INCLUDE_FILTER": "jacoco.include_filter", "LOCAL_JACK_COVERAGE_EXCLUDE_FILTER": "jacoco.exclude_filter", + + "LOCAL_FULL_LIBS_MANIFEST_FILES": "additional_manifests", }) addStandardProperties(bpparser.BoolType, diff --git a/java/aar.go b/java/aar.go index ce3d1263..a4e6f910 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 { @@ -220,7 +223,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 |