Merge "Make additional manifests transitive" am: c706a186cc
am: 0dfed47e18
am: 5d0531cb50
am: 4880380729
Change-Id: I9ffe1fd796268419833cecb4d40cfc5ff6a8d188
This commit is contained in:
commit
6a01f40d24
13
java/aar.go
13
java/aar.go
|
@ -220,14 +220,13 @@ func (a *aapt) buildActions(ctx android.ModuleContext, sdkContext sdkContext, ex
|
||||||
manifestPath := manifestFixer(ctx, manifestSrcPath, sdkContext, sdkLibraries,
|
manifestPath := manifestFixer(ctx, manifestSrcPath, sdkContext, sdkLibraries,
|
||||||
a.isLibrary, a.useEmbeddedNativeLibs, a.usesNonSdkApis, a.useEmbeddedDex, a.hasNoCode)
|
a.isLibrary, a.useEmbeddedNativeLibs, a.usesNonSdkApis, a.useEmbeddedDex, a.hasNoCode)
|
||||||
|
|
||||||
a.transitiveManifestPaths = append(android.Paths{manifestPath}, transitiveStaticLibManifests...)
|
// Add additional manifest files to transitive manifests.
|
||||||
|
additionalManifests := android.PathsForModuleSrc(ctx, a.aaptProperties.Additional_manifests)
|
||||||
|
a.transitiveManifestPaths = append(android.Paths{manifestPath}, additionalManifests...)
|
||||||
|
a.transitiveManifestPaths = append(a.transitiveManifestPaths, transitiveStaticLibManifests...)
|
||||||
|
|
||||||
if len(transitiveStaticLibManifests) > 0 {
|
if len(a.transitiveManifestPaths) > 1 {
|
||||||
// Merge additional manifest files with app manifest.
|
a.mergedManifestFile = manifestMerger(ctx, a.transitiveManifestPaths[0], a.transitiveManifestPaths[1:], a.isLibrary)
|
||||||
additionalManifests := android.PathsForModuleSrc(ctx, a.aaptProperties.Additional_manifests)
|
|
||||||
additionalManifests = append(additionalManifests, transitiveStaticLibManifests...)
|
|
||||||
|
|
||||||
a.mergedManifestFile = manifestMerger(ctx, manifestPath, additionalManifests, a.isLibrary)
|
|
||||||
if !a.isLibrary {
|
if !a.isLibrary {
|
||||||
// Only use the merged manifest for applications. For libraries, the transitive closure of manifests
|
// 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
|
// will be propagated to the final application and merged there. The merged manifest for libraries is
|
||||||
|
|
Loading…
Reference in New Issue