Merge "Remove the code for bazel when reading ReleaseAconfigValueSets." into main am: 65287d5dc2 am: 1a91da57f8 am: bac244d6cb

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2864661

Change-Id: Ie6a3fe572b010c918dcb75a2d12d50a56daa3c3a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Yu Liu
2023-12-08 23:17:17 +00:00
committed by Automerger Merge Worker

View File

@@ -210,22 +210,7 @@ func (c Config) ReleaseVersion() string {
// The aconfig value set passed to aconfig, derived from RELEASE_VERSION
func (c Config) ReleaseAconfigValueSets() []string {
// This logic to handle both Soong module name and bazel target is temporary in order to
// provide backward compatibility where aosp and internal both have the release
// aconfig value set but can't be updated at the same time to use bazel target
var valueSets []string
for _, valueSet := range c.config.productVariables.ReleaseAconfigValueSets {
value := strings.Split(valueSet, ":")
valueLen := len(value)
if valueLen > 2 {
// This shouldn't happen as this should be either a module name or a bazel target path.
panic(fmt.Errorf("config file: invalid value for release aconfig value sets: %s", valueSet))
}
if valueLen > 0 {
valueSets = append(valueSets, value[valueLen-1])
}
}
return valueSets
return c.config.productVariables.ReleaseAconfigValueSets
}
// The flag default permission value passed to aconfig