Merge "Add support for auto-generated characteristics RRO" into main am: b5d713f2cb
am: 99913d4e59
am: 6b52e7aabe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2817177 Change-Id: I7bca74e210529ae6c2fbcb7746e06b7d4a493e8c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
11
java/aar.go
11
java/aar.go
@@ -102,6 +102,9 @@ type aaptProperties struct {
|
||||
|
||||
// true if RRO is enforced for any of the dependent modules
|
||||
RROEnforcedForDependent bool `blueprint:"mutated"`
|
||||
|
||||
// Filter only specified product and ignore other products
|
||||
Filter_product *string `blueprint:"mutated"`
|
||||
}
|
||||
|
||||
type aapt struct {
|
||||
@@ -162,6 +165,10 @@ func (a *aapt) useResourceProcessorBusyBox() bool {
|
||||
return BoolDefault(a.aaptProperties.Use_resource_processor, false)
|
||||
}
|
||||
|
||||
func (a *aapt) filterProduct() string {
|
||||
return String(a.aaptProperties.Filter_product)
|
||||
}
|
||||
|
||||
func (a *aapt) ExportPackage() android.Path {
|
||||
return a.exportPackage
|
||||
}
|
||||
@@ -434,7 +441,7 @@ func (a *aapt) buildActions(ctx android.ModuleContext, opts aaptBuildActionOptio
|
||||
var compiledResDirs []android.Paths
|
||||
for _, dir := range resDirs {
|
||||
a.resourceFiles = append(a.resourceFiles, dir.files...)
|
||||
compiledResDirs = append(compiledResDirs, aapt2Compile(ctx, dir.dir, dir.files, compileFlags).Paths())
|
||||
compiledResDirs = append(compiledResDirs, aapt2Compile(ctx, dir.dir, dir.files, compileFlags, a.filterProduct()).Paths())
|
||||
}
|
||||
|
||||
for i, zip := range resZips {
|
||||
@@ -493,7 +500,7 @@ func (a *aapt) buildActions(ctx android.ModuleContext, opts aaptBuildActionOptio
|
||||
}
|
||||
|
||||
for _, dir := range overlayDirs {
|
||||
compiledOverlay = append(compiledOverlay, aapt2Compile(ctx, dir.dir, dir.files, compileFlags).Paths()...)
|
||||
compiledOverlay = append(compiledOverlay, aapt2Compile(ctx, dir.dir, dir.files, compileFlags, a.filterProduct()).Paths()...)
|
||||
}
|
||||
|
||||
var splitPackages android.WritablePaths
|
||||
|
Reference in New Issue
Block a user