diff options
| author | 2024-11-06 19:59:31 +0000 | |
|---|---|---|
| committer | 2024-11-06 19:59:31 +0000 | |
| commit | 9bbdbfbb36586586cbf2632882275ee45b41ece7 (patch) | |
| tree | 0072ca5bbd90bd47aa0468d419a493dea91be08a | |
| parent | c31c1967c4c6bf28e4795381d3b85ac28c3d9590 (diff) | |
| parent | 5b9897759b3b580d9e7de2b12533112847f63ec8 (diff) | |
Merge "Make resource_dirs configurable" into main
| -rw-r--r-- | java/aar.go | 4 | ||||
| -rw-r--r-- | java/app.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/java/aar.go b/java/aar.go index 66ca00af8..b5cdde36a 100644 --- a/java/aar.go +++ b/java/aar.go @@ -77,7 +77,7 @@ type aaptProperties struct { // list of directories relative to the Blueprints file containing // Android resources. Defaults to ["res"] if a directory called res exists. // Set to [] to disable the default. - Resource_dirs []string `android:"path"` + Resource_dirs proptools.Configurable[[]string] `android:"path"` // list of zip files containing Android resources. Resource_zips []string `android:"path"` @@ -275,7 +275,7 @@ func (a *aapt) aapt2Flags(ctx android.ModuleContext, sdkContext android.SdkConte IncludeDirs: false, }) assetDirs := android.PathsWithOptionalDefaultForModuleSrc(ctx, a.aaptProperties.Asset_dirs, "assets") - resourceDirs := android.PathsWithOptionalDefaultForModuleSrc(ctx, a.aaptProperties.Resource_dirs, "res") + resourceDirs := android.PathsWithOptionalDefaultForModuleSrc(ctx, a.aaptProperties.Resource_dirs.GetOrDefault(ctx, nil), "res") resourceZips := android.PathsForModuleSrc(ctx, a.aaptProperties.Resource_zips) // Glob directories into lists of paths diff --git a/java/app.go b/java/app.go index 6572dbdf3..94c9e5b82 100644 --- a/java/app.go +++ b/java/app.go @@ -1361,7 +1361,7 @@ func AndroidAppFactory() android.Module { Filter_product *string Aaptflags []string Manifest *string - Resource_dirs []string + Resource_dirs proptools.Configurable[[]string] Flags_packages []string }{ Name: proptools.StringPtr(rroPackageName), |