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

Commit c706a186 authored by Colin Cross's avatar Colin Cross Committed by Gerrit Code Review
Browse files

Merge "Make additional manifests transitive"

parents 916f1e48 fd89882a
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -220,14 +220,13 @@ func (a *aapt) buildActions(ctx android.ModuleContext, sdkContext sdkContext, ex
	manifestPath := manifestFixer(ctx, manifestSrcPath, sdkContext, sdkLibraries,
		a.isLibrary, a.useEmbeddedNativeLibs, a.usesNonSdkApis, a.useEmbeddedDex, a.hasNoCode)

	a.transitiveManifestPaths = append(android.Paths{manifestPath}, transitiveStaticLibManifests...)

	if len(transitiveStaticLibManifests) > 0 {
		// Merge additional manifest files with app manifest.
	// Add additional manifest files to transitive manifests.
	additionalManifests := android.PathsForModuleSrc(ctx, a.aaptProperties.Additional_manifests)
		additionalManifests = append(additionalManifests, transitiveStaticLibManifests...)
	a.transitiveManifestPaths = append(android.Paths{manifestPath}, additionalManifests...)
	a.transitiveManifestPaths = append(a.transitiveManifestPaths, transitiveStaticLibManifests...)

		a.mergedManifestFile = manifestMerger(ctx, manifestPath, additionalManifests, a.isLibrary)
	if len(a.transitiveManifestPaths) > 1 {
		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
			// will be propagated to the final application and merged there.  The merged manifest for libraries is