diff options
author | Jooyung Han <jooyung@google.com> | 2020-06-20 12:47:47 +0900 |
---|---|---|
committer | Jooyung Han <jooyung@google.com> | 2020-06-20 12:56:49 +0900 |
commit | faa5399b3f304ab152c39c858d0ca4af8735a750 (patch) | |
tree | fd1dd97d44fc9a5f2ad8fe4d110e8e7dcf4b150c /apex/apex.go | |
parent | 8d6286befebf56020edc9bb939272227d8bdf6d2 (diff) | |
download | build_soong-faa5399b3f304ab152c39c858d0ca4af8735a750.tar.gz build_soong-faa5399b3f304ab152c39c858d0ca4af8735a750.tar.bz2 build_soong-faa5399b3f304ab152c39c858d0ca4af8735a750.zip |
apex: make allowed_files prop overridable
Because override_apex can modify the contents of the base apex,
allowed_files (which describes the contents) should be overridable.
Bug: 159503079
Bug: 159392784
Bug: 158169437
Test: m (soong test added)
Change-Id: I12744b0465dc3cfc90a66643867e65b4092cd0f7
Diffstat (limited to 'apex/apex.go')
-rw-r--r-- | apex/apex.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apex/apex.go b/apex/apex.go index 387b29b1..848de425 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -1031,9 +1031,6 @@ type apexBundleProperties struct { // List of providing APEXes' names so that this APEX can depend on provided shared libraries. Uses []string - // A txt file containing list of files that are allowed to be included in this APEX. - Allowed_files *string - // package format of this apex variant; could be non-flattened, flattened, or zip. // imageApex, zipApex or flattened ApexType apexPackaging `blueprint:"mutated"` @@ -1106,6 +1103,9 @@ type overridableProperties struct { // Apex Container Package Name. // Override value for attribute package:name in AndroidManifest.xml Package_name string + + // A txt file containing list of files that are allowed to be included in this APEX. + Allowed_files *string `android:"path"` } type apexPackaging int @@ -1510,6 +1510,9 @@ func (a *apexBundle) DepsMutator(ctx android.BottomUpMutatorContext) { } func (a *apexBundle) OverridablePropertiesDepsMutator(ctx android.BottomUpMutatorContext) { + if a.overridableProperties.Allowed_files != nil { + android.ExtractSourceDeps(ctx, a.overridableProperties.Allowed_files) + } ctx.AddFarVariationDependencies(ctx.Config().AndroidCommonTarget.Variations(), androidAppTag, a.overridableProperties.Apps...) } |