Use an option struct in aapt.buildActions & manifestMerger
Change-Id: Ia056ab321e1fd146ed0cdb98fc2d4455601f648c Test: Treehugger
This commit is contained in:
@@ -200,11 +200,16 @@ func ManifestFixer(ctx android.ModuleContext, manifest android.Path,
|
||||
return fixedManifest.WithoutRel()
|
||||
}
|
||||
|
||||
func manifestMerger(ctx android.ModuleContext, manifest android.Path, staticLibManifests android.Paths,
|
||||
isLibrary bool) android.Path {
|
||||
type ManifestMergerParams struct {
|
||||
staticLibManifests android.Paths
|
||||
isLibrary bool
|
||||
}
|
||||
|
||||
func manifestMerger(ctx android.ModuleContext, manifest android.Path,
|
||||
params ManifestMergerParams) android.Path {
|
||||
|
||||
var args string
|
||||
if !isLibrary {
|
||||
if !params.isLibrary {
|
||||
// Follow Gradle's behavior, only pass --remove-tools-declarations when merging app manifests.
|
||||
args = "--remove-tools-declarations"
|
||||
}
|
||||
@@ -214,10 +219,10 @@ func manifestMerger(ctx android.ModuleContext, manifest android.Path, staticLibM
|
||||
Rule: manifestMergerRule,
|
||||
Description: "merge manifest",
|
||||
Input: manifest,
|
||||
Implicits: staticLibManifests,
|
||||
Implicits: params.staticLibManifests,
|
||||
Output: mergedManifest,
|
||||
Args: map[string]string{
|
||||
"libs": android.JoinWithPrefix(staticLibManifests.Strings(), "--libs "),
|
||||
"libs": android.JoinWithPrefix(params.staticLibManifests.Strings(), "--libs "),
|
||||
"args": args,
|
||||
},
|
||||
})
|
||||
|
Reference in New Issue
Block a user