Merge "Compress precompiled python zips" into main
diff --git a/aconfig/codegen/cc_aconfig_library.go b/aconfig/codegen/cc_aconfig_library.go
index 2d3ee39..f3e9599 100644
--- a/aconfig/codegen/cc_aconfig_library.go
+++ b/aconfig/codegen/cc_aconfig_library.go
@@ -22,6 +22,7 @@
"github.com/google/blueprint/proptools"
"fmt"
+ "strconv"
"strings"
)
@@ -36,7 +37,6 @@
const libBaseDep = "libbase"
const libLogDep = "liblog"
const libAconfigStorageReadApiCcDep = "libaconfig_storage_read_api_cc"
-const libAconfigStorageProtosCcDep = "libaconfig_storage_protos_cc"
type CcAconfigLibraryProperties struct {
// name of the aconfig_declarations module to generate a library for
@@ -88,10 +88,9 @@
if mode != "force-read-only" {
deps.SharedLibs = append(deps.SharedLibs, baseLibDep)
- deps.SharedLibs = append(deps.SharedLibs, libBaseDep)
- deps.SharedLibs = append(deps.SharedLibs, libLogDep)
deps.SharedLibs = append(deps.SharedLibs, libAconfigStorageReadApiCcDep)
- deps.SharedLibs = append(deps.SharedLibs, libAconfigStorageProtosCcDep)
+ deps.SharedLibs = append(deps.SharedLibs, libLogDep)
+ deps.SharedLibs = append(deps.SharedLibs, libBaseDep)
}
// TODO: It'd be really nice if we could reexport this library and not make everyone do it.
@@ -154,6 +153,7 @@
Args: map[string]string{
"gendir": this.generatedDir.String(),
"mode": mode,
+ "debug": strconv.FormatBool(ctx.Config().ReleaseReadFromNewStorageCc()),
},
})
diff --git a/aconfig/codegen/init.go b/aconfig/codegen/init.go
index 73a8951..6182e14 100644
--- a/aconfig/codegen/init.go
+++ b/aconfig/codegen/init.go
@@ -49,11 +49,12 @@
` && ${aconfig} create-cpp-lib` +
` --mode ${mode}` +
` --cache ${in}` +
- ` --out ${gendir}`,
+ ` --out ${gendir}` +
+ ` --allow-instrumentation ${debug}`,
CommandDeps: []string{
"$aconfig",
},
- }, "gendir", "mode")
+ }, "gendir", "mode", "debug")
// For rust_aconfig_library: Generate Rust library
rustRule = pctx.AndroidStaticRule("rust_aconfig_library",
diff --git a/aconfig/codegen/java_aconfig_library.go b/aconfig/codegen/java_aconfig_library.go
index a46ce52..9f42e21 100644
--- a/aconfig/codegen/java_aconfig_library.go
+++ b/aconfig/codegen/java_aconfig_library.go
@@ -115,6 +115,7 @@
module.AddJarJarRenameRule(declarations.Package+".Flags", "")
module.AddJarJarRenameRule(declarations.Package+".FeatureFlags", "")
module.AddJarJarRenameRule(declarations.Package+".FeatureFlagsImpl", "")
+ module.AddJarJarRenameRule(declarations.Package+".CustomFeatureFlags", "")
module.AddJarJarRenameRule(declarations.Package+".FakeFeatureFlagsImpl", "")
}
diff --git a/android/config.go b/android/config.go
index 75d135f..b60eb5c 100644
--- a/android/config.go
+++ b/android/config.go
@@ -229,6 +229,11 @@
return c.config.productVariables.GetBuildFlagBool("RELEASE_NDK_ABI_MONITORED")
}
+// Enable read flag from new storage, for C/C++
+func (c Config) ReleaseReadFromNewStorageCc() bool {
+ return c.config.productVariables.GetBuildFlagBool("RELEASE_READ_FROM_NEW_STORAGE_CC")
+}
+
func (c Config) ReleaseHiddenApiExportableStubs() bool {
return c.config.productVariables.GetBuildFlagBool("RELEASE_HIDDEN_API_EXPORTABLE_STUBS") ||
Bool(c.config.productVariables.HiddenapiExportableStubs)
diff --git a/android/module.go b/android/module.go
index 5fe379c..effca03 100644
--- a/android/module.go
+++ b/android/module.go
@@ -2142,13 +2142,13 @@
func (e configurationEvalutor) EvaluateConfiguration(condition proptools.ConfigurableCondition, property string) proptools.ConfigurableValue {
ctx := e.ctx
m := e.m
- switch condition.FunctionName {
+ switch condition.FunctionName() {
case "release_variable":
- if len(condition.Args) != 1 {
- ctx.OtherModulePropertyErrorf(m, property, "release_variable requires 1 argument, found %d", len(condition.Args))
+ if condition.NumArgs() != 1 {
+ ctx.OtherModulePropertyErrorf(m, property, "release_variable requires 1 argument, found %d", condition.NumArgs())
return proptools.ConfigurableValueUndefined()
}
- if v, ok := ctx.Config().productVariables.BuildFlags[condition.Args[0]]; ok {
+ if v, ok := ctx.Config().productVariables.BuildFlags[condition.Arg(0)]; ok {
return proptools.ConfigurableValueString(v)
}
return proptools.ConfigurableValueUndefined()
@@ -2157,12 +2157,12 @@
ctx.OtherModulePropertyErrorf(m, property, "TODO(b/323382414): Product variables are not yet supported in selects")
return proptools.ConfigurableValueUndefined()
case "soong_config_variable":
- if len(condition.Args) != 2 {
- ctx.OtherModulePropertyErrorf(m, property, "soong_config_variable requires 2 arguments, found %d", len(condition.Args))
+ if condition.NumArgs() != 2 {
+ ctx.OtherModulePropertyErrorf(m, property, "soong_config_variable requires 2 arguments, found %d", condition.NumArgs())
return proptools.ConfigurableValueUndefined()
}
- namespace := condition.Args[0]
- variable := condition.Args[1]
+ namespace := condition.Arg(0)
+ variable := condition.Arg(1)
if n, ok := ctx.Config().productVariables.VendorVars[namespace]; ok {
if v, ok := n[variable]; ok {
return proptools.ConfigurableValueString(v)
@@ -2170,8 +2170,8 @@
}
return proptools.ConfigurableValueUndefined()
case "arch":
- if len(condition.Args) != 0 {
- ctx.OtherModulePropertyErrorf(m, property, "arch requires no arguments, found %d", len(condition.Args))
+ if condition.NumArgs() != 0 {
+ ctx.OtherModulePropertyErrorf(m, property, "arch requires no arguments, found %d", condition.NumArgs())
return proptools.ConfigurableValueUndefined()
}
if !m.base().ArchReady() {
@@ -2180,8 +2180,8 @@
}
return proptools.ConfigurableValueString(m.base().Arch().ArchType.Name)
case "os":
- if len(condition.Args) != 0 {
- ctx.OtherModulePropertyErrorf(m, property, "os requires no arguments, found %d", len(condition.Args))
+ if condition.NumArgs() != 0 {
+ ctx.OtherModulePropertyErrorf(m, property, "os requires no arguments, found %d", condition.NumArgs())
return proptools.ConfigurableValueUndefined()
}
// the arch mutator runs after the os mutator, we can just use this to enforce that os is ready.
@@ -2194,8 +2194,8 @@
// We currently don't have any other boolean variables (we should add support for typing
// the soong config variables), so add this fake one for testing the boolean select
// functionality.
- if len(condition.Args) != 0 {
- ctx.OtherModulePropertyErrorf(m, property, "boolean_var_for_testing requires 0 arguments, found %d", len(condition.Args))
+ if condition.NumArgs() != 0 {
+ ctx.OtherModulePropertyErrorf(m, property, "boolean_var_for_testing requires 0 arguments, found %d", condition.NumArgs())
return proptools.ConfigurableValueUndefined()
}
diff --git a/android/selects_test.go b/android/selects_test.go
index f912ce6..8563285 100644
--- a/android/selects_test.go
+++ b/android/selects_test.go
@@ -28,6 +28,7 @@
name string
bp string
provider selectsTestProvider
+ providers map[string]selectsTestProvider
vendorVars map[string]map[string]string
expectedError string
}{
@@ -411,6 +412,42 @@
},
},
{
+ name: "defaults applied to multiple modules",
+ bp: `
+ my_module_type {
+ name: "foo2",
+ defaults: ["bar"],
+ my_string_list: select(soong_config_variable("my_namespace", "my_variable"), {
+ "a": ["a1"],
+ default: ["b1"],
+ }),
+ }
+ my_module_type {
+ name: "foo",
+ defaults: ["bar"],
+ my_string_list: select(soong_config_variable("my_namespace", "my_variable"), {
+ "a": ["a1"],
+ default: ["b1"],
+ }),
+ }
+ my_defaults {
+ name: "bar",
+ my_string_list: select(soong_config_variable("my_namespace", "my_variable2"), {
+ "a": ["a2"],
+ default: ["b2"],
+ }),
+ }
+ `,
+ providers: map[string]selectsTestProvider{
+ "foo": {
+ my_string_list: &[]string{"b2", "b1"},
+ },
+ "foo2": {
+ my_string_list: &[]string{"b2", "b1"},
+ },
+ },
+ },
+ {
name: "Replacing string list",
bp: `
my_module_type {
@@ -617,10 +654,19 @@
result := fixtures.RunTestWithBp(t, tc.bp)
if tc.expectedError == "" {
- m := result.ModuleForTests("foo", "android_arm64_armv8-a")
- p, _ := OtherModuleProvider(result.testContext.OtherModuleProviderAdaptor(), m.Module(), selectsTestProviderKey)
- if !reflect.DeepEqual(p, tc.provider) {
- t.Errorf("Expected:\n %q\ngot:\n %q", tc.provider.String(), p.String())
+ if len(tc.providers) == 0 {
+ tc.providers = map[string]selectsTestProvider{
+ "foo": tc.provider,
+ }
+ }
+
+ for moduleName := range tc.providers {
+ expected := tc.providers[moduleName]
+ m := result.ModuleForTests(moduleName, "android_arm64_armv8-a")
+ p, _ := OtherModuleProvider(result.testContext.OtherModuleProviderAdaptor(), m.Module(), selectsTestProviderKey)
+ if !reflect.DeepEqual(p, expected) {
+ t.Errorf("Expected:\n %q\ngot:\n %q", expected.String(), p.String())
+ }
}
}
})
diff --git a/apex/aconfig_test.go b/apex/aconfig_test.go
index 3de9286..726041c 100644
--- a/apex/aconfig_test.go
+++ b/apex/aconfig_test.go
@@ -165,6 +165,9 @@
cc_library {
name: "libbase",
srcs: ["libbase.cc"],
+ apex_available: [
+ "myapex",
+ ],
}
cc_library {
name: "libaconfig_storage_read_api_cc",
@@ -425,6 +428,9 @@
cc_library {
name: "libbase",
srcs: ["libbase.cc"],
+ apex_available: [
+ "myapex",
+ ],
}
cc_library {
name: "libaconfig_storage_read_api_cc",
@@ -487,6 +493,9 @@
cc_library {
name: "libbase",
srcs: ["libbase.cc"],
+ apex_available: [
+ "myapex",
+ ],
}
cc_library {
name: "libaconfig_storage_read_api_cc",
diff --git a/apex/apex_test.go b/apex/apex_test.go
index 8a3735c..3e284b1 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -10694,6 +10694,9 @@
cc_library {
name: "libbase",
srcs: ["libbase.cc"],
+ apex_available: [
+ "myapex",
+ ],
}
cc_library {
name: "libaconfig_storage_read_api_cc",
diff --git a/cc/builder.go b/cc/builder.go
index 845176e..e78b8c0 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -855,8 +855,8 @@
// into a single .ldump sAbi dump file
func transformDumpToLinkedDump(ctx android.ModuleContext, sAbiDumps android.Paths, soFile android.Path,
baseName string, exportedIncludeDirs []string, symbolFile android.OptionalPath,
- excludedSymbolVersions, excludedSymbolTags []string,
- api string) android.Path {
+ excludedSymbolVersions, excludedSymbolTags, includedSymbolTags []string,
+ api string, isLlndk bool) android.Path {
outputFile := android.PathForModuleOut(ctx, baseName+".lsdump")
@@ -874,6 +874,12 @@
for _, tag := range excludedSymbolTags {
symbolFilterStr += " --exclude-symbol-tag " + tag
}
+ for _, tag := range includedSymbolTags {
+ symbolFilterStr += " --include-symbol-tag " + tag
+ }
+ if isLlndk {
+ symbolFilterStr += " --symbol-tag-policy MatchTagOnly"
+ }
apiLevelsJson := android.GetApiLevelsJson(ctx)
implicits = append(implicits, apiLevelsJson)
symbolFilterStr += " --api-map " + apiLevelsJson.String()
diff --git a/cc/library.go b/cc/library.go
index 44bbdfc..a436649 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -1249,28 +1249,29 @@
func (library *libraryDecorator) linkLlndkSAbiDumpFiles(ctx ModuleContext,
deps PathDeps, sAbiDumpFiles android.Paths, soFile android.Path, libFileName string,
- excludeSymbolVersions, excludeSymbolTags []string) android.Path {
+ excludeSymbolVersions, excludeSymbolTags []string,
+ vendorApiLevel string) android.Path {
// NDK symbols in version 34 are LLNDK symbols. Those in version 35 are not.
- // TODO(b/314010764): Add parameters to read LLNDK symbols from the symbol file.
return transformDumpToLinkedDump(ctx,
sAbiDumpFiles, soFile, libFileName+".llndk",
library.llndkIncludeDirsForAbiCheck(ctx, deps),
android.OptionalPathForModuleSrc(ctx, library.Properties.Llndk.Symbol_file),
append([]string{"*_PLATFORM", "*_PRIVATE"}, excludeSymbolVersions...),
append([]string{"platform-only"}, excludeSymbolTags...),
- "34")
+ []string{"llndk=" + vendorApiLevel}, "34", true /* isLlndk */)
}
func (library *libraryDecorator) linkApexSAbiDumpFiles(ctx ModuleContext,
deps PathDeps, sAbiDumpFiles android.Paths, soFile android.Path, libFileName string,
- excludeSymbolVersions, excludeSymbolTags []string, sdkVersion string) android.Path {
+ excludeSymbolVersions, excludeSymbolTags []string,
+ sdkVersion string) android.Path {
return transformDumpToLinkedDump(ctx,
sAbiDumpFiles, soFile, libFileName+".apex",
library.exportedIncludeDirsForAbiCheck(ctx),
android.OptionalPathForModuleSrc(ctx, library.Properties.Stubs.Symbol_file),
append([]string{"*_PLATFORM", "*_PRIVATE"}, excludeSymbolVersions...),
append([]string{"platform-only"}, excludeSymbolTags...),
- sdkVersion)
+ []string{"apex", "systemapi"}, sdkVersion, false /* isLlndk */)
}
func getRefAbiDumpFile(ctx android.ModuleInstallPathContext,
@@ -1397,18 +1398,19 @@
android.OptionalPathForModuleSrc(ctx, library.symbolFileForAbiCheck(ctx)),
headerAbiChecker.Exclude_symbol_versions,
headerAbiChecker.Exclude_symbol_tags,
- currSdkVersion)
+ []string{} /* includeSymbolTags */, currSdkVersion, false /* isLlndk */)
var llndkDump, apexVariantDump android.Path
tags := classifySourceAbiDump(ctx)
for _, tag := range tags {
- if tag == llndkLsdumpTag {
+ if tag == llndkLsdumpTag && currVendorVersion != "" {
if llndkDump == nil {
// TODO(b/323447559): Evaluate if replacing sAbiDumpFiles with implDump is faster
llndkDump = library.linkLlndkSAbiDumpFiles(ctx,
deps, objs.sAbiDumpFiles, soFile, fileName,
headerAbiChecker.Exclude_symbol_versions,
- headerAbiChecker.Exclude_symbol_tags)
+ headerAbiChecker.Exclude_symbol_tags,
+ currVendorVersion)
}
addLsdumpPath(string(tag) + ":" + llndkDump.String())
} else if tag == apexLsdumpTag {
diff --git a/cmd/release_config/crunch_flags/main.go b/cmd/release_config/crunch_flags/main.go
index 69abba2..5b64062 100644
--- a/cmd/release_config/crunch_flags/main.go
+++ b/cmd/release_config/crunch_flags/main.go
@@ -102,10 +102,13 @@
description = ""
continue
}
- declValue := matches[declRegexp.SubexpIndex("value")]
declName := matches[declRegexp.SubexpIndex("name")]
- container := rc_proto.Container(rc_proto.Container_value[matches[declRegexp.SubexpIndex("container")]])
+ declValue := matches[declRegexp.SubexpIndex("value")]
description = strings.TrimSpace(description)
+ containers := []string{strings.ToLower(matches[declRegexp.SubexpIndex("container")])}
+ if containers[0] == "all" {
+ containers = []string{"product", "system", "system_ext", "vendor"}
+ }
var namespace string
var ok bool
if namespace, ok = namespaceMap[declName]; !ok {
@@ -115,7 +118,7 @@
Name: proto.String(declName),
Namespace: proto.String(namespace),
Description: proto.String(description),
- Container: &container,
+ Containers: containers,
}
description = ""
// Most build flags are `workflow: PREBUILT`.
@@ -163,7 +166,7 @@
}
func ProcessBuildConfigs(dir, name string, paths []string, releaseProto *rc_proto.ReleaseConfig) error {
- valRegexp, err := regexp.Compile("[[:space:]]+value.\"(?<name>[A-Z_0-9]+)\",[[:space:]]*(?<value>[^,)]*)")
+ valRegexp, err := regexp.Compile("[[:space:]]+value.\"(?<name>[A-Z_0-9]+)\",[[:space:]]*(?<value>(\"[^\"]*\"|[^\",)]*))")
if err != nil {
return err
}
@@ -213,6 +216,12 @@
return err
}
+var (
+ allContainers = func() []string {
+ return []string{"product", "system", "system_ext", "vendor"}
+ }()
+)
+
func ProcessReleaseConfigMap(dir string, descriptionMap map[string]string) error {
path := filepath.Join(dir, "release_config_map.mk")
if _, err := os.Stat(path); err != nil {
@@ -235,16 +244,16 @@
return err
}
cleanDir := strings.TrimLeft(dir, "../")
- var defaultContainer rc_proto.Container
+ var defaultContainers []string
switch {
case strings.HasPrefix(cleanDir, "build/") || cleanDir == "vendor/google_shared/build":
- defaultContainer = rc_proto.Container(rc_proto.Container_ALL)
+ defaultContainers = allContainers
case cleanDir == "vendor/google/release":
- defaultContainer = rc_proto.Container(rc_proto.Container_ALL)
+ defaultContainers = allContainers
default:
- defaultContainer = rc_proto.Container(rc_proto.Container_VENDOR)
+ defaultContainers = []string{"vendor"}
}
- releaseConfigMap := &rc_proto.ReleaseConfigMap{DefaultContainer: &defaultContainer}
+ releaseConfigMap := &rc_proto.ReleaseConfigMap{DefaultContainers: defaultContainers}
// If we find a description for the directory, include it.
if description, ok := descriptionMap[cleanDir]; ok {
releaseConfigMap.Description = proto.String(description)
diff --git a/cmd/release_config/release_config/main.go b/cmd/release_config/release_config/main.go
index a43fdcc..22e72a5 100644
--- a/cmd/release_config/release_config/main.go
+++ b/cmd/release_config/release_config/main.go
@@ -33,6 +33,7 @@
var configs *rc_lib.ReleaseConfigs
var json, pb, textproto bool
var product string
+ var allMake bool
defaultRelease := os.Getenv("TARGET_RELEASE")
if defaultRelease == "" {
@@ -48,6 +49,7 @@
flag.BoolVar(&textproto, "textproto", true, "write artifacts as text protobuf")
flag.BoolVar(&json, "json", true, "write artifacts as json")
flag.BoolVar(&pb, "pb", true, "write artifacts as binary protobuf")
+ flag.BoolVar(&allMake, "all_make", true, "write makefiles for all release configs")
flag.Parse()
if quiet {
@@ -70,11 +72,26 @@
if err != nil {
panic(err)
}
- makefilePath := filepath.Join(outputDir, fmt.Sprintf("release_config-%s-%s.mk", product, releaseName))
- err = configs.WriteMakefile(makefilePath, targetRelease)
- if err != nil {
+
+ if err = config.WritePartitionBuildFlags(outputDir, product, targetRelease); err != nil {
panic(err)
}
+
+ if allMake {
+ for k, _ := range configs.ReleaseConfigs {
+ makefilePath := filepath.Join(outputDir, fmt.Sprintf("release_config-%s-%s.mk", product, k))
+ err = configs.WriteMakefile(makefilePath, k)
+ if err != nil {
+ panic(err)
+ }
+ }
+ } else {
+ makefilePath := filepath.Join(outputDir, fmt.Sprintf("release_config-%s-%s.mk", product, releaseName))
+ err = configs.WriteMakefile(makefilePath, targetRelease)
+ if err != nil {
+ panic(err)
+ }
+ }
if json {
err = configs.WriteArtifact(outputDir, product, "json")
if err != nil {
diff --git a/cmd/release_config/release_config_lib/flag_artifact.go b/cmd/release_config/release_config_lib/flag_artifact.go
index d6a629b..cba1b5c 100644
--- a/cmd/release_config/release_config_lib/flag_artifact.go
+++ b/cmd/release_config/release_config_lib/flag_artifact.go
@@ -129,3 +129,14 @@
Traces: fa.Traces,
}, nil
}
+
+// Marshal the FlagArtifact without Traces.
+func (fa *FlagArtifact) MarshalWithoutTraces() (*rc_proto.FlagArtifact, error) {
+ if fa.Redacted {
+ return nil, nil
+ }
+ return &rc_proto.FlagArtifact{
+ FlagDeclaration: fa.FlagDeclaration,
+ Value: fa.Value,
+ }, nil
+}
diff --git a/cmd/release_config/release_config_lib/release_config.go b/cmd/release_config/release_config_lib/release_config.go
index b08b6a3..5996c46 100644
--- a/cmd/release_config/release_config_lib/release_config.go
+++ b/cmd/release_config/release_config_lib/release_config.go
@@ -15,7 +15,11 @@
package release_config_lib
import (
+ "cmp"
"fmt"
+ "path/filepath"
+ "slices"
+ "sort"
"strings"
rc_proto "android/soong/cmd/release_config/release_config_proto"
@@ -66,12 +70,31 @@
// We have begun compiling this release config.
compileInProgress bool
+
+ // Partitioned artifacts for {partition}/etc/build_flags.json
+ PartitionBuildFlags map[string]*rc_proto.FlagArtifacts
}
func ReleaseConfigFactory(name string, index int) (c *ReleaseConfig) {
return &ReleaseConfig{Name: name, DeclarationIndex: index}
}
+func (config *ReleaseConfig) InheritConfig(iConfig *ReleaseConfig) error {
+ for _, fa := range iConfig.FlagArtifacts {
+ name := *fa.FlagDeclaration.Name
+ myFa, ok := config.FlagArtifacts[name]
+ if !ok {
+ return fmt.Errorf("Could not inherit flag %s from %s", name, iConfig.Name)
+ }
+ if len(fa.Traces) > 1 {
+ // A value was assigned. Set our value.
+ myFa.Traces = append(myFa.Traces, fa.Traces[1:]...)
+ myFa.Value = fa.Value
+ }
+ }
+ return nil
+}
+
func (config *ReleaseConfig) GenerateReleaseConfig(configs *ReleaseConfigs) error {
if config.ReleaseConfigArtifact != nil {
return nil
@@ -82,6 +105,24 @@
config.compileInProgress = true
isRoot := config.Name == "root"
+ // Start with only the flag declarations.
+ config.FlagArtifacts = configs.FlagArtifacts.Clone()
+ // Add RELEASE_ACONFIG_VALUE_SETS
+ workflowManual := rc_proto.Workflow(rc_proto.Workflow_MANUAL)
+ releaseAconfigValueSets := FlagArtifact{
+ FlagDeclaration: &rc_proto.FlagDeclaration{
+ Name: proto.String("RELEASE_ACONFIG_VALUE_SETS"),
+ Namespace: proto.String("android_UNKNOWN"),
+ Description: proto.String("Aconfig value sets assembled by release-config"),
+ Workflow: &workflowManual,
+ Containers: []string{"system", "system_ext", "product", "vendor"},
+ Value: &rc_proto.Value{Val: &rc_proto.Value_UnspecifiedValue{false}},
+ },
+ DeclarationIndex: -1,
+ Traces: []*rc_proto.Tracepoint{},
+ }
+ config.FlagArtifacts["RELEASE_ACONFIG_VALUE_SETS"] = &releaseAconfigValueSets
+
// Generate any configs we need to inherit. This will detect loops in
// the config.
contributionsToApply := []*ReleaseConfigContribution{}
@@ -103,55 +144,39 @@
return err
}
iConfig.GenerateReleaseConfig(configs)
- contributionsToApply = append(contributionsToApply, iConfig.Contributions...)
+ if err := config.InheritConfig(iConfig); err != nil {
+ return err
+ }
}
contributionsToApply = append(contributionsToApply, config.Contributions...)
- myAconfigValueSets := []string{}
+ myAconfigValueSets := strings.Split(releaseAconfigValueSets.Value.GetStringValue(), " ")
myAconfigValueSetsMap := map[string]bool{}
- myFlags := configs.FlagArtifacts.Clone()
- workflowManual := rc_proto.Workflow(rc_proto.Workflow_MANUAL)
- container := rc_proto.Container(rc_proto.Container_ALL)
- releaseAconfigValueSets := FlagArtifact{
- FlagDeclaration: &rc_proto.FlagDeclaration{
- Name: proto.String("RELEASE_ACONFIG_VALUE_SETS"),
- Namespace: proto.String("android_UNKNOWN"),
- Description: proto.String("Aconfig value sets assembled by release-config"),
- Workflow: &workflowManual,
- Container: &container,
- Value: &rc_proto.Value{Val: &rc_proto.Value_StringValue{""}},
- },
- DeclarationIndex: -1,
- Traces: []*rc_proto.Tracepoint{
- &rc_proto.Tracepoint{
- Source: proto.String("$release-config"),
- Value: &rc_proto.Value{Val: &rc_proto.Value_StringValue{""}},
- },
- },
+ for _, v := range myAconfigValueSets {
+ myAconfigValueSetsMap[v] = true
}
- myFlags["RELEASE_ACONFIG_VALUE_SETS"] = &releaseAconfigValueSets
myDirsMap := make(map[int]bool)
for _, contrib := range contributionsToApply {
- if len(contrib.proto.AconfigValueSets) > 0 {
- contribAconfigValueSets := []string{}
- for _, v := range contrib.proto.AconfigValueSets {
- if _, ok := myAconfigValueSetsMap[v]; !ok {
- contribAconfigValueSets = append(contribAconfigValueSets, v)
- myAconfigValueSetsMap[v] = true
- }
+ contribAconfigValueSets := []string{}
+ // Gather the aconfig_value_sets from this contribution that are not already in the list.
+ for _, v := range contrib.proto.AconfigValueSets {
+ if _, ok := myAconfigValueSetsMap[v]; !ok {
+ contribAconfigValueSets = append(contribAconfigValueSets, v)
+ myAconfigValueSetsMap[v] = true
}
- myAconfigValueSets = append(myAconfigValueSets, contribAconfigValueSets...)
- releaseAconfigValueSets.Traces = append(
- releaseAconfigValueSets.Traces,
- &rc_proto.Tracepoint{
- Source: proto.String(contrib.path),
- Value: &rc_proto.Value{Val: &rc_proto.Value_StringValue{strings.Join(contribAconfigValueSets, " ")}},
- })
}
+ myAconfigValueSets = append(myAconfigValueSets, contribAconfigValueSets...)
+ releaseAconfigValueSets.Traces = append(
+ releaseAconfigValueSets.Traces,
+ &rc_proto.Tracepoint{
+ Source: proto.String(contrib.path),
+ Value: &rc_proto.Value{Val: &rc_proto.Value_StringValue{strings.Join(contribAconfigValueSets, " ")}},
+ })
+
myDirsMap[contrib.DeclarationIndex] = true
for _, value := range contrib.FlagValues {
name := *value.proto.Name
- fa, ok := myFlags[name]
+ fa, ok := config.FlagArtifacts[name]
if !ok {
return fmt.Errorf("Setting value for undefined flag %s in %s\n", name, value.path)
}
@@ -168,11 +193,11 @@
return err
}
if fa.Redacted {
- delete(myFlags, name)
+ delete(config.FlagArtifacts, name)
}
}
}
- releaseAconfigValueSets.Value = &rc_proto.Value{Val: &rc_proto.Value_StringValue{strings.Join(myAconfigValueSets, " ")}}
+ releaseAconfigValueSets.Value = &rc_proto.Value{Val: &rc_proto.Value_StringValue{strings.TrimSpace(strings.Join(myAconfigValueSets, " "))}}
directories := []string{}
for idx, confDir := range configs.configDirs {
@@ -181,13 +206,32 @@
}
}
- config.FlagArtifacts = myFlags
+ // Now build the per-partition artifacts
+ config.PartitionBuildFlags = make(map[string]*rc_proto.FlagArtifacts)
+ for _, v := range config.FlagArtifacts {
+ artifact, err := v.MarshalWithoutTraces()
+ if err != nil {
+ return err
+ }
+ for _, container := range v.FlagDeclaration.Containers {
+ if _, ok := config.PartitionBuildFlags[container]; !ok {
+ config.PartitionBuildFlags[container] = &rc_proto.FlagArtifacts{}
+ }
+ config.PartitionBuildFlags[container].FlagArtifacts = append(config.PartitionBuildFlags[container].FlagArtifacts, artifact)
+ }
+ }
config.ReleaseConfigArtifact = &rc_proto.ReleaseConfigArtifact{
Name: proto.String(config.Name),
OtherNames: config.OtherNames,
FlagArtifacts: func() []*rc_proto.FlagArtifact {
ret := []*rc_proto.FlagArtifact{}
- for _, flag := range myFlags {
+ flagNames := []string{}
+ for k := range config.FlagArtifacts {
+ flagNames = append(flagNames, k)
+ }
+ sort.Strings(flagNames)
+ for _, flagName := range flagNames {
+ flag := config.FlagArtifacts[flagName]
ret = append(ret, &rc_proto.FlagArtifact{
FlagDeclaration: flag.FlagDeclaration,
Traces: flag.Traces,
@@ -204,3 +248,16 @@
config.compileInProgress = false
return nil
}
+
+func (config *ReleaseConfig) WritePartitionBuildFlags(outDir, product, targetRelease string) error {
+ var err error
+ for partition, flags := range config.PartitionBuildFlags {
+ slices.SortFunc(flags.FlagArtifacts, func(a, b *rc_proto.FlagArtifact) int {
+ return cmp.Compare(*a.FlagDeclaration.Name, *b.FlagDeclaration.Name)
+ })
+ if err = WriteMessage(filepath.Join(outDir, fmt.Sprintf("build_flags_%s-%s-%s.json", partition, config.Name, product)), flags); err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/cmd/release_config/release_config_lib/release_configs.go b/cmd/release_config/release_config_lib/release_configs.go
index aba8cd2..d7d4a8c 100644
--- a/cmd/release_config/release_config_lib/release_configs.go
+++ b/cmd/release_config/release_config_lib/release_configs.go
@@ -118,9 +118,14 @@
func (configs *ReleaseConfigs) LoadReleaseConfigMap(path string, ConfigDirIndex int) error {
m := ReleaseConfigMapFactory(path)
- if m.proto.DefaultContainer == nil {
+ if m.proto.DefaultContainers == nil {
return fmt.Errorf("Release config map %s lacks default_container", path)
}
+ for _, container := range m.proto.DefaultContainers {
+ if !validContainer(container) {
+ return fmt.Errorf("Release config map %s has invalid container %s", path, container)
+ }
+ }
dir := filepath.Dir(path)
// Record any aliases, checking for duplicates.
for _, alias := range m.proto.Aliases {
@@ -138,9 +143,16 @@
err = WalkTextprotoFiles(dir, "flag_declarations", func(path string, d fs.DirEntry, err error) error {
flagDeclaration := FlagDeclarationFactory(path)
// Container must be specified.
- if flagDeclaration.Container == nil {
- flagDeclaration.Container = m.proto.DefaultContainer
+ if flagDeclaration.Containers == nil {
+ flagDeclaration.Containers = m.proto.DefaultContainers
+ } else {
+ for _, container := range flagDeclaration.Containers {
+ if !validContainer(container) {
+ return fmt.Errorf("Flag declaration %s has invalid container %s", path, container)
+ }
+ }
}
+
// TODO: once we have namespaces initialized, we can throw an error here.
if flagDeclaration.Namespace == nil {
flagDeclaration.Namespace = proto.String("android_UNKNOWN")
@@ -253,19 +265,12 @@
flag := myFlagArtifacts[name]
decl := flag.FlagDeclaration
- // cName := strings.ToLower(rc_proto.Container_name[decl.GetContainer()])
- cName := strings.ToLower(decl.Container.String())
- if cName == strings.ToLower(rc_proto.Container_ALL.String()) {
- partitions["product"] = append(partitions["product"], name)
- partitions["system"] = append(partitions["system"], name)
- partitions["system_ext"] = append(partitions["system_ext"], name)
- partitions["vendor"] = append(partitions["vendor"], name)
- } else {
- partitions[cName] = append(partitions[cName], name)
+ for _, container := range decl.Containers {
+ partitions[container] = append(partitions[container], name)
}
value := MarshalValue(flag.Value)
makeVars[name] = value
- addVar(name, "PARTITIONS", cName)
+ addVar(name, "PARTITIONS", strings.Join(decl.Containers, " "))
addVar(name, "DEFAULT", MarshalValue(decl.Value))
addVar(name, "VALUE", value)
addVar(name, "DECLARED_IN", *flag.Traces[0].Source)
@@ -372,9 +377,14 @@
}
configs := ReleaseConfigsFactory()
+ mapsRead := make(map[string]bool)
for idx, releaseConfigMapPath := range releaseConfigMapPaths {
// Maintain an ordered list of release config directories.
configDir := filepath.Dir(releaseConfigMapPath)
+ if mapsRead[configDir] {
+ continue
+ }
+ mapsRead[configDir] = true
configs.configDirIndexes[configDir] = idx
configs.configDirs = append(configs.configDirs, configDir)
err = configs.LoadReleaseConfigMap(releaseConfigMapPath, idx)
diff --git a/cmd/release_config/release_config_lib/util.go b/cmd/release_config/release_config_lib/util.go
index 86940da..d55cf29 100644
--- a/cmd/release_config/release_config_lib/util.go
+++ b/cmd/release_config/release_config_lib/util.go
@@ -20,13 +20,17 @@
"io/fs"
"os"
"path/filepath"
+ "regexp"
"strings"
"google.golang.org/protobuf/encoding/prototext"
"google.golang.org/protobuf/proto"
)
-var disableWarnings bool
+var (
+ disableWarnings bool
+ containerRegexp, _ = regexp.Compile("^[a-z][a-z0-9]*([._][a-z][a-z0-9]*)*$")
+)
type StringList []string
@@ -128,6 +132,10 @@
return 0, nil
}
+func validContainer(container string) bool {
+ return containerRegexp.MatchString(container)
+}
+
// Returns the default value for release config artifacts.
func GetDefaultOutDir() string {
outEnv := os.Getenv("OUT_DIR")
diff --git a/cmd/release_config/release_config_proto/build_flags_out.pb.go b/cmd/release_config/release_config_proto/build_flags_out.pb.go
index 77e2069..483cffa 100644
--- a/cmd/release_config/release_config_proto/build_flags_out.pb.go
+++ b/cmd/release_config/release_config_proto/build_flags_out.pb.go
@@ -153,6 +153,54 @@
return nil
}
+type FlagArtifacts struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The artifacts
+ FlagArtifacts []*FlagArtifact `protobuf:"bytes,1,rep,name=flag_artifacts,json=flagArtifacts" json:"flag_artifacts,omitempty"`
+}
+
+func (x *FlagArtifacts) Reset() {
+ *x = FlagArtifacts{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_build_flags_out_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FlagArtifacts) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FlagArtifacts) ProtoMessage() {}
+
+func (x *FlagArtifacts) ProtoReflect() protoreflect.Message {
+ mi := &file_build_flags_out_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FlagArtifacts.ProtoReflect.Descriptor instead.
+func (*FlagArtifacts) Descriptor() ([]byte, []int) {
+ return file_build_flags_out_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *FlagArtifacts) GetFlagArtifacts() []*FlagArtifact {
+ if x != nil {
+ return x.FlagArtifacts
+ }
+ return nil
+}
+
type ReleaseConfigArtifact struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -179,7 +227,7 @@
func (x *ReleaseConfigArtifact) Reset() {
*x = ReleaseConfigArtifact{}
if protoimpl.UnsafeEnabled {
- mi := &file_build_flags_out_proto_msgTypes[2]
+ mi := &file_build_flags_out_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -192,7 +240,7 @@
func (*ReleaseConfigArtifact) ProtoMessage() {}
func (x *ReleaseConfigArtifact) ProtoReflect() protoreflect.Message {
- mi := &file_build_flags_out_proto_msgTypes[2]
+ mi := &file_build_flags_out_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -205,7 +253,7 @@
// Deprecated: Use ReleaseConfigArtifact.ProtoReflect.Descriptor instead.
func (*ReleaseConfigArtifact) Descriptor() ([]byte, []int) {
- return file_build_flags_out_proto_rawDescGZIP(), []int{2}
+ return file_build_flags_out_proto_rawDescGZIP(), []int{3}
}
func (x *ReleaseConfigArtifact) GetName() string {
@@ -266,7 +314,7 @@
func (x *ReleaseConfigsArtifact) Reset() {
*x = ReleaseConfigsArtifact{}
if protoimpl.UnsafeEnabled {
- mi := &file_build_flags_out_proto_msgTypes[3]
+ mi := &file_build_flags_out_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -279,7 +327,7 @@
func (*ReleaseConfigsArtifact) ProtoMessage() {}
func (x *ReleaseConfigsArtifact) ProtoReflect() protoreflect.Message {
- mi := &file_build_flags_out_proto_msgTypes[3]
+ mi := &file_build_flags_out_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -292,7 +340,7 @@
// Deprecated: Use ReleaseConfigsArtifact.ProtoReflect.Descriptor instead.
func (*ReleaseConfigsArtifact) Descriptor() ([]byte, []int) {
- return file_build_flags_out_proto_rawDescGZIP(), []int{3}
+ return file_build_flags_out_proto_rawDescGZIP(), []int{4}
}
func (x *ReleaseConfigsArtifact) GetReleaseConfig() *ReleaseConfigArtifact {
@@ -344,58 +392,64 @@
0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69,
0x64, 0x2e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x70, 0x6f, 0x69, 0x6e,
- 0x74, 0x52, 0x06, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x22, 0x8e, 0x02, 0x0a, 0x17, 0x72, 0x65,
- 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x61, 0x72, 0x74,
- 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x74, 0x68,
- 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a,
- 0x6f, 0x74, 0x68, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x52, 0x0a, 0x0e, 0x66, 0x6c,
- 0x61, 0x67, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x72, 0x65, 0x6c,
- 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52,
- 0x0d, 0x66, 0x6c, 0x61, 0x67, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x2c,
- 0x0a, 0x12, 0x61, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f,
- 0x73, 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x61, 0x63, 0x6f, 0x6e,
- 0x66, 0x69, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x53, 0x65, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08,
- 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08,
- 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x69, 0x72, 0x65,
- 0x63, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x64,
- 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0xe8, 0x03, 0x0a, 0x18, 0x72,
- 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x5f, 0x61,
- 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x5c, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x65, 0x61,
- 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x35, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73,
- 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72,
- 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x61, 0x72,
- 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43,
- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x69, 0x0a, 0x15, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x72,
- 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x02,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x72,
- 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66,
- 0x69, 0x67, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x13, 0x6f, 0x74, 0x68,
- 0x65, 0x72, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73,
- 0x12, 0x87, 0x01, 0x0a, 0x17, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e,
- 0x66, 0x69, 0x67, 0x5f, 0x6d, 0x61, 0x70, 0x73, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x03, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x50, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x72, 0x65, 0x6c,
- 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x73, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61,
- 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x61, 0x70, 0x73, 0x4d, 0x61, 0x70, 0x45,
- 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e,
- 0x66, 0x69, 0x67, 0x4d, 0x61, 0x70, 0x73, 0x4d, 0x61, 0x70, 0x1a, 0x79, 0x0a, 0x19, 0x52, 0x65,
- 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x61, 0x70, 0x73, 0x4d,
- 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x05, 0x76, 0x61, 0x6c,
- 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f,
+ 0x74, 0x52, 0x06, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x22, 0x64, 0x0a, 0x0e, 0x66, 0x6c, 0x61,
+ 0x67, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x52, 0x0a, 0x0e, 0x66,
+ 0x6c, 0x61, 0x67, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x72, 0x65,
+ 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74,
+ 0x52, 0x0d, 0x66, 0x6c, 0x61, 0x67, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x22,
+ 0x8e, 0x02, 0x0a, 0x17, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
+ 0x1f, 0x0a, 0x0b, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02,
+ 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73,
+ 0x12, 0x52, 0x0a, 0x0e, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63,
+ 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f,
+ 0x69, 0x64, 0x2e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x61, 0x72, 0x74,
+ 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x0d, 0x66, 0x6c, 0x61, 0x67, 0x41, 0x72, 0x74, 0x69, 0x66,
+ 0x61, 0x63, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x61, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09,
+ 0x52, 0x10, 0x61, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x53, 0x65,
+ 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x73, 0x18, 0x05,
+ 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x73, 0x12, 0x20,
+ 0x0a, 0x0b, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20,
+ 0x03, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73,
+ 0x22, 0xe8, 0x03, 0x0a, 0x18, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x73, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x5c, 0x0a,
+ 0x0e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e,
+ 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x0d, 0x72, 0x65,
+ 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x69, 0x0a, 0x15, 0x6f,
+ 0x74, 0x68, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x61, 0x6e, 0x64,
+ 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73,
+ 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63,
+ 0x74, 0x52, 0x13, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x17, 0x72, 0x65, 0x6c, 0x65, 0x61,
+ 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6d, 0x61, 0x70, 0x73, 0x5f, 0x6d,
+ 0x61, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x50, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f,
0x69, 0x64, 0x2e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
0x67, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f,
- 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6d, 0x61, 0x70, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
- 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x33, 0x5a, 0x31, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64,
- 0x2f, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63,
- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f,
- 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74,
+ 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x61,
+ 0x70, 0x73, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x14, 0x72, 0x65, 0x6c, 0x65,
+ 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4d, 0x61, 0x70, 0x73, 0x4d, 0x61, 0x70,
+ 0x1a, 0x79, 0x0a, 0x19, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x4d, 0x61, 0x70, 0x73, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
+ 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
+ 0x46, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30,
+ 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65,
+ 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x65,
+ 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6d, 0x61, 0x70,
+ 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x33, 0x5a, 0x31, 0x61,
+ 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2f, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x6c,
+ 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x65, 0x6c, 0x65,
+ 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
}
var (
@@ -410,32 +464,34 @@
return file_build_flags_out_proto_rawDescData
}
-var file_build_flags_out_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
+var file_build_flags_out_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_build_flags_out_proto_goTypes = []interface{}{
(*Tracepoint)(nil), // 0: android.release_config_proto.tracepoint
(*FlagArtifact)(nil), // 1: android.release_config_proto.flag_artifact
- (*ReleaseConfigArtifact)(nil), // 2: android.release_config_proto.release_config_artifact
- (*ReleaseConfigsArtifact)(nil), // 3: android.release_config_proto.release_configs_artifact
- nil, // 4: android.release_config_proto.release_configs_artifact.ReleaseConfigMapsMapEntry
- (*Value)(nil), // 5: android.release_config_proto.value
- (*FlagDeclaration)(nil), // 6: android.release_config_proto.flag_declaration
- (*ReleaseConfigMap)(nil), // 7: android.release_config_proto.release_config_map
+ (*FlagArtifacts)(nil), // 2: android.release_config_proto.flag_artifacts
+ (*ReleaseConfigArtifact)(nil), // 3: android.release_config_proto.release_config_artifact
+ (*ReleaseConfigsArtifact)(nil), // 4: android.release_config_proto.release_configs_artifact
+ nil, // 5: android.release_config_proto.release_configs_artifact.ReleaseConfigMapsMapEntry
+ (*Value)(nil), // 6: android.release_config_proto.value
+ (*FlagDeclaration)(nil), // 7: android.release_config_proto.flag_declaration
+ (*ReleaseConfigMap)(nil), // 8: android.release_config_proto.release_config_map
}
var file_build_flags_out_proto_depIdxs = []int32{
- 5, // 0: android.release_config_proto.tracepoint.value:type_name -> android.release_config_proto.value
- 6, // 1: android.release_config_proto.flag_artifact.flag_declaration:type_name -> android.release_config_proto.flag_declaration
- 5, // 2: android.release_config_proto.flag_artifact.value:type_name -> android.release_config_proto.value
- 0, // 3: android.release_config_proto.flag_artifact.traces:type_name -> android.release_config_proto.tracepoint
- 1, // 4: android.release_config_proto.release_config_artifact.flag_artifacts:type_name -> android.release_config_proto.flag_artifact
- 2, // 5: android.release_config_proto.release_configs_artifact.release_config:type_name -> android.release_config_proto.release_config_artifact
- 2, // 6: android.release_config_proto.release_configs_artifact.other_release_configs:type_name -> android.release_config_proto.release_config_artifact
- 4, // 7: android.release_config_proto.release_configs_artifact.release_config_maps_map:type_name -> android.release_config_proto.release_configs_artifact.ReleaseConfigMapsMapEntry
- 7, // 8: android.release_config_proto.release_configs_artifact.ReleaseConfigMapsMapEntry.value:type_name -> android.release_config_proto.release_config_map
- 9, // [9:9] is the sub-list for method output_type
- 9, // [9:9] is the sub-list for method input_type
- 9, // [9:9] is the sub-list for extension type_name
- 9, // [9:9] is the sub-list for extension extendee
- 0, // [0:9] is the sub-list for field type_name
+ 6, // 0: android.release_config_proto.tracepoint.value:type_name -> android.release_config_proto.value
+ 7, // 1: android.release_config_proto.flag_artifact.flag_declaration:type_name -> android.release_config_proto.flag_declaration
+ 6, // 2: android.release_config_proto.flag_artifact.value:type_name -> android.release_config_proto.value
+ 0, // 3: android.release_config_proto.flag_artifact.traces:type_name -> android.release_config_proto.tracepoint
+ 1, // 4: android.release_config_proto.flag_artifacts.flag_artifacts:type_name -> android.release_config_proto.flag_artifact
+ 1, // 5: android.release_config_proto.release_config_artifact.flag_artifacts:type_name -> android.release_config_proto.flag_artifact
+ 3, // 6: android.release_config_proto.release_configs_artifact.release_config:type_name -> android.release_config_proto.release_config_artifact
+ 3, // 7: android.release_config_proto.release_configs_artifact.other_release_configs:type_name -> android.release_config_proto.release_config_artifact
+ 5, // 8: android.release_config_proto.release_configs_artifact.release_config_maps_map:type_name -> android.release_config_proto.release_configs_artifact.ReleaseConfigMapsMapEntry
+ 8, // 9: android.release_config_proto.release_configs_artifact.ReleaseConfigMapsMapEntry.value:type_name -> android.release_config_proto.release_config_map
+ 10, // [10:10] is the sub-list for method output_type
+ 10, // [10:10] is the sub-list for method input_type
+ 10, // [10:10] is the sub-list for extension type_name
+ 10, // [10:10] is the sub-list for extension extendee
+ 0, // [0:10] is the sub-list for field type_name
}
func init() { file_build_flags_out_proto_init() }
@@ -470,7 +526,7 @@
}
}
file_build_flags_out_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ReleaseConfigArtifact); i {
+ switch v := v.(*FlagArtifacts); i {
case 0:
return &v.state
case 1:
@@ -482,6 +538,18 @@
}
}
file_build_flags_out_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ReleaseConfigArtifact); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_build_flags_out_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ReleaseConfigsArtifact); i {
case 0:
return &v.state
@@ -500,7 +568,7 @@
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_build_flags_out_proto_rawDesc,
NumEnums: 0,
- NumMessages: 5,
+ NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/cmd/release_config/release_config_proto/build_flags_out.proto b/cmd/release_config/release_config_proto/build_flags_out.proto
index 05e770f..6f34d6f 100644
--- a/cmd/release_config/release_config_proto/build_flags_out.proto
+++ b/cmd/release_config/release_config_proto/build_flags_out.proto
@@ -52,6 +52,11 @@
repeated tracepoint traces = 8;
}
+message flag_artifacts {
+ // The artifacts
+ repeated flag_artifact flag_artifacts = 1;
+}
+
message release_config_artifact {
// The name of the release config.
// See # name for format detail
diff --git a/cmd/release_config/release_config_proto/build_flags_src.pb.go b/cmd/release_config/release_config_proto/build_flags_src.pb.go
index ca2005c..8054bd9 100644
--- a/cmd/release_config/release_config_proto/build_flags_src.pb.go
+++ b/cmd/release_config/release_config_proto/build_flags_src.pb.go
@@ -98,76 +98,6 @@
return file_build_flags_src_proto_rawDescGZIP(), []int{0}
}
-type Container int32
-
-const (
- Container_UNSPECIFIED_container Container = 0
- // All containers
- Container_ALL Container = 1
- // Specific containers
- Container_PRODUCT Container = 2
- Container_SYSTEM Container = 3
- Container_SYSTEM_EXT Container = 4
- Container_VENDOR Container = 5
-)
-
-// Enum value maps for Container.
-var (
- Container_name = map[int32]string{
- 0: "UNSPECIFIED_container",
- 1: "ALL",
- 2: "PRODUCT",
- 3: "SYSTEM",
- 4: "SYSTEM_EXT",
- 5: "VENDOR",
- }
- Container_value = map[string]int32{
- "UNSPECIFIED_container": 0,
- "ALL": 1,
- "PRODUCT": 2,
- "SYSTEM": 3,
- "SYSTEM_EXT": 4,
- "VENDOR": 5,
- }
-)
-
-func (x Container) Enum() *Container {
- p := new(Container)
- *p = x
- return p
-}
-
-func (x Container) String() string {
- return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
-}
-
-func (Container) Descriptor() protoreflect.EnumDescriptor {
- return file_build_flags_src_proto_enumTypes[1].Descriptor()
-}
-
-func (Container) Type() protoreflect.EnumType {
- return &file_build_flags_src_proto_enumTypes[1]
-}
-
-func (x Container) Number() protoreflect.EnumNumber {
- return protoreflect.EnumNumber(x)
-}
-
-// Deprecated: Do not use.
-func (x *Container) UnmarshalJSON(b []byte) error {
- num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
- if err != nil {
- return err
- }
- *x = Container(num)
- return nil
-}
-
-// Deprecated: Use Container.Descriptor instead.
-func (Container) EnumDescriptor() ([]byte, []int) {
- return file_build_flags_src_proto_rawDescGZIP(), []int{1}
-}
-
type Value struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -298,7 +228,7 @@
Workflow *Workflow `protobuf:"varint,205,opt,name=workflow,enum=android.release_config_proto.Workflow" json:"workflow,omitempty"`
// The container for this flag. This overrides any default container given
// in the release_config_map message.
- Container *Container `protobuf:"varint,206,opt,name=container,enum=android.release_config_proto.Container" json:"container,omitempty"`
+ Containers []string `protobuf:"bytes,206,rep,name=containers" json:"containers,omitempty"`
}
func (x *FlagDeclaration) Reset() {
@@ -368,11 +298,11 @@
return Workflow_UNSPECIFIED_workflow
}
-func (x *FlagDeclaration) GetContainer() Container {
- if x != nil && x.Container != nil {
- return *x.Container
+func (x *FlagDeclaration) GetContainers() []string {
+ if x != nil {
+ return x.Containers
}
- return Container_UNSPECIFIED_container
+ return nil
}
type FlagValue struct {
@@ -581,7 +511,7 @@
// Description of this map and its intended use.
Description *string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"`
// The default container for flags declared here.
- DefaultContainer *Container `protobuf:"varint,3,opt,name=default_container,json=defaultContainer,enum=android.release_config_proto.Container" json:"default_container,omitempty"`
+ DefaultContainers []string `protobuf:"bytes,3,rep,name=default_containers,json=defaultContainers" json:"default_containers,omitempty"`
}
func (x *ReleaseConfigMap) Reset() {
@@ -630,11 +560,11 @@
return ""
}
-func (x *ReleaseConfigMap) GetDefaultContainer() Container {
- if x != nil && x.DefaultContainer != nil {
- return *x.DefaultContainer
+func (x *ReleaseConfigMap) GetDefaultContainers() []string {
+ if x != nil {
+ return x.DefaultContainers
}
- return Container_UNSPECIFIED_container
+ return nil
}
var File_build_flags_src_proto protoreflect.FileDescriptor
@@ -653,7 +583,7 @@
0x6c, 0x75, 0x65, 0x18, 0xca, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f,
0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x08, 0x6f, 0x62, 0x73, 0x6f, 0x6c,
0x65, 0x74, 0x65, 0x18, 0xcb, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x08, 0x6f, 0x62,
- 0x73, 0x6f, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x22, 0xbd, 0x02,
+ 0x73, 0x6f, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x96, 0x02,
0x0a, 0x10, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70,
@@ -668,59 +598,47 @@
0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e,
0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x08, 0x77,
- 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x46, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61,
- 0x69, 0x6e, 0x65, 0x72, 0x18, 0xce, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x61, 0x6e,
- 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f,
- 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x61,
- 0x69, 0x6e, 0x65, 0x72, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4a,
- 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x06, 0x08, 0xcf, 0x01, 0x10, 0xd0, 0x01, 0x22, 0x79, 0x0a,
- 0x0a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e,
- 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
- 0x3a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0xc9, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x23, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73,
- 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x08, 0x72,
- 0x65, 0x64, 0x61, 0x63, 0x74, 0x65, 0x64, 0x18, 0xca, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08,
- 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x65, 0x64, 0x22, 0x6e, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x65,
- 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
- 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a,
- 0x0a, 0x08, 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09,
- 0x52, 0x08, 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x61, 0x63,
- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x73,
- 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x61, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56,
- 0x61, 0x6c, 0x75, 0x65, 0x53, 0x65, 0x74, 0x73, 0x22, 0x3b, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x65,
- 0x61, 0x73, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
- 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a,
- 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74,
- 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0xd3, 0x01, 0x0a, 0x12, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73,
- 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6d, 0x61, 0x70, 0x12, 0x45, 0x0a, 0x07,
- 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e,
- 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f,
- 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c,
- 0x65, 0x61, 0x73, 0x65, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61,
- 0x73, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x54, 0x0a, 0x11, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
- 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e,
- 0x32, 0x27, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x72, 0x65, 0x6c, 0x65, 0x61,
- 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
- 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x10, 0x64, 0x65, 0x66, 0x61, 0x75,
- 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x2a, 0x4a, 0x0a, 0x08, 0x77,
- 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x4e, 0x53, 0x50, 0x45,
- 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x10,
- 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x41, 0x55, 0x4e, 0x43, 0x48, 0x10, 0x01, 0x12, 0x0c, 0x0a,
- 0x08, 0x50, 0x52, 0x45, 0x42, 0x55, 0x49, 0x4c, 0x54, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x4d,
- 0x41, 0x4e, 0x55, 0x41, 0x4c, 0x10, 0x03, 0x2a, 0x64, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61,
- 0x69, 0x6e, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
- 0x49, 0x45, 0x44, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x10, 0x00, 0x12,
- 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x4f, 0x44,
- 0x55, 0x43, 0x54, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x10,
- 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x45, 0x58, 0x54, 0x10,
- 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x56, 0x45, 0x4e, 0x44, 0x4f, 0x52, 0x10, 0x05, 0x42, 0x33, 0x5a,
- 0x31, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2f, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x2f, 0x72,
- 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x65,
- 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x72, 0x6f,
- 0x74, 0x6f,
+ 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1f, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x61,
+ 0x69, 0x6e, 0x65, 0x72, 0x73, 0x18, 0xce, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f,
+ 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x06,
+ 0x08, 0xcf, 0x01, 0x10, 0xd0, 0x01, 0x22, 0x79, 0x0a, 0x0a, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x18, 0xc9, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f,
+ 0x69, 0x64, 0x2e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x65, 0x64,
+ 0x18, 0xca, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x65,
+ 0x64, 0x22, 0x6e, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x68, 0x65, 0x72,
+ 0x69, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x68, 0x65, 0x72,
+ 0x69, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x61, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52,
+ 0x10, 0x61, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x53, 0x65, 0x74,
+ 0x73, 0x22, 0x3b, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x61, 0x6c, 0x69,
+ 0x61, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0xac,
+ 0x01, 0x0a, 0x12, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x5f, 0x6d, 0x61, 0x70, 0x12, 0x45, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64,
+ 0x2e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x61, 0x6c,
+ 0x69, 0x61, 0x73, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x0b,
+ 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d,
+ 0x0a, 0x12, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
+ 0x6e, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x64, 0x65, 0x66, 0x61,
+ 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x2a, 0x4a, 0x0a,
+ 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x4e, 0x53,
+ 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
+ 0x77, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x41, 0x55, 0x4e, 0x43, 0x48, 0x10, 0x01, 0x12,
+ 0x0c, 0x0a, 0x08, 0x50, 0x52, 0x45, 0x42, 0x55, 0x49, 0x4c, 0x54, 0x10, 0x02, 0x12, 0x0a, 0x0a,
+ 0x06, 0x4d, 0x41, 0x4e, 0x55, 0x41, 0x4c, 0x10, 0x03, 0x42, 0x33, 0x5a, 0x31, 0x61, 0x6e, 0x64,
+ 0x72, 0x6f, 0x69, 0x64, 0x2f, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61,
+ 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73,
+ 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
}
var (
@@ -735,30 +653,27 @@
return file_build_flags_src_proto_rawDescData
}
-var file_build_flags_src_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_build_flags_src_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_build_flags_src_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_build_flags_src_proto_goTypes = []interface{}{
(Workflow)(0), // 0: android.release_config_proto.workflow
- (Container)(0), // 1: android.release_config_proto.container
- (*Value)(nil), // 2: android.release_config_proto.value
- (*FlagDeclaration)(nil), // 3: android.release_config_proto.flag_declaration
- (*FlagValue)(nil), // 4: android.release_config_proto.flag_value
- (*ReleaseConfig)(nil), // 5: android.release_config_proto.release_config
- (*ReleaseAlias)(nil), // 6: android.release_config_proto.release_alias
- (*ReleaseConfigMap)(nil), // 7: android.release_config_proto.release_config_map
+ (*Value)(nil), // 1: android.release_config_proto.value
+ (*FlagDeclaration)(nil), // 2: android.release_config_proto.flag_declaration
+ (*FlagValue)(nil), // 3: android.release_config_proto.flag_value
+ (*ReleaseConfig)(nil), // 4: android.release_config_proto.release_config
+ (*ReleaseAlias)(nil), // 5: android.release_config_proto.release_alias
+ (*ReleaseConfigMap)(nil), // 6: android.release_config_proto.release_config_map
}
var file_build_flags_src_proto_depIdxs = []int32{
- 2, // 0: android.release_config_proto.flag_declaration.value:type_name -> android.release_config_proto.value
+ 1, // 0: android.release_config_proto.flag_declaration.value:type_name -> android.release_config_proto.value
0, // 1: android.release_config_proto.flag_declaration.workflow:type_name -> android.release_config_proto.workflow
- 1, // 2: android.release_config_proto.flag_declaration.container:type_name -> android.release_config_proto.container
- 2, // 3: android.release_config_proto.flag_value.value:type_name -> android.release_config_proto.value
- 6, // 4: android.release_config_proto.release_config_map.aliases:type_name -> android.release_config_proto.release_alias
- 1, // 5: android.release_config_proto.release_config_map.default_container:type_name -> android.release_config_proto.container
- 6, // [6:6] is the sub-list for method output_type
- 6, // [6:6] is the sub-list for method input_type
- 6, // [6:6] is the sub-list for extension type_name
- 6, // [6:6] is the sub-list for extension extendee
- 0, // [0:6] is the sub-list for field type_name
+ 1, // 2: android.release_config_proto.flag_value.value:type_name -> android.release_config_proto.value
+ 5, // 3: android.release_config_proto.release_config_map.aliases:type_name -> android.release_config_proto.release_alias
+ 4, // [4:4] is the sub-list for method output_type
+ 4, // [4:4] is the sub-list for method input_type
+ 4, // [4:4] is the sub-list for extension type_name
+ 4, // [4:4] is the sub-list for extension extendee
+ 0, // [0:4] is the sub-list for field type_name
}
func init() { file_build_flags_src_proto_init() }
@@ -851,7 +766,7 @@
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_build_flags_src_proto_rawDesc,
- NumEnums: 2,
+ NumEnums: 1,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
diff --git a/cmd/release_config/release_config_proto/build_flags_src.proto b/cmd/release_config/release_config_proto/build_flags_src.proto
index 92edc2a..017e5d4 100644
--- a/cmd/release_config/release_config_proto/build_flags_src.proto
+++ b/cmd/release_config/release_config_proto/build_flags_src.proto
@@ -53,19 +53,6 @@
MANUAL = 3;
}
-enum container {
- UNSPECIFIED_container = 0;
-
- // All containers
- ALL = 1;
-
- // Specific containers
- PRODUCT = 2;
- SYSTEM = 3;
- SYSTEM_EXT = 4;
- VENDOR = 5;
-}
-
message value {
oneof val {
bool unspecified_value = 200;
@@ -100,7 +87,7 @@
// The container for this flag. This overrides any default container given
// in the release_config_map message.
- optional container container = 206;
+ repeated string containers = 206;
// The package associated with this flag.
// (when Gantry is ready for it) optional string package = 207;
@@ -152,7 +139,7 @@
optional string description = 2;
// The default container for flags declared here.
- optional container default_container = 3;
+ repeated string default_containers = 3;
// If needed, we can add these fields instead of hardcoding the location.
// Flag declarations: `flag_declarations/*.textproto`
diff --git a/java/droidstubs.go b/java/droidstubs.go
index ffd3caf..08caf91 100644
--- a/java/droidstubs.go
+++ b/java/droidstubs.go
@@ -614,11 +614,36 @@
filename := proptools.StringDefault(d.properties.Api_levels_jar_filename, "android.jar")
+ // TODO: Avoid the duplication of API surfaces, reuse apiScope.
+ // Add all relevant --android-jar-pattern patterns for Metalava.
+ // When parsing a stub jar for a specific version, Metalava picks the first pattern that defines
+ // an actual file present on disk (in the order the patterns were passed). For system APIs for
+ // privileged apps that are only defined since API level 21 (Lollipop), fallback to public stubs
+ // for older releases. Similarly, module-lib falls back to system API.
+ var sdkDirs []string
+ switch proptools.StringDefault(d.properties.Api_levels_sdk_type, "public") {
+ case "system-server":
+ sdkDirs = []string{"system-server", "module-lib", "system", "public"}
+ case "module-lib":
+ sdkDirs = []string{"module-lib", "system", "public"}
+ case "system":
+ sdkDirs = []string{"system", "public"}
+ case "public":
+ sdkDirs = []string{"public"}
+ default:
+ ctx.PropertyErrorf("api_levels_sdk_type", "needs to be one of %v", allowedApiLevelSdkTypes)
+ return
+ }
+
+ // Use the first item in the sdkDirs array as that is the sdk type for the target API levels
+ // being generated but has the advantage over `Api_levels_sdk_type` as it has been validated.
+ extensionsPattern := fmt.Sprintf(`/extensions/[0-9]+/%s/.*\.jar`, sdkDirs[0])
+
var dirs []string
var extensions_dir string
ctx.VisitDirectDepsWithTag(metalavaAPILevelsAnnotationsDirTag, func(m android.Module) {
if t, ok := m.(*ExportedDroiddocDir); ok {
- extRegex := regexp.MustCompile(t.dir.String() + `/extensions/[0-9]+/public/.*\.jar`)
+ extRegex := regexp.MustCompile(t.dir.String() + extensionsPattern)
// Grab the first extensions_dir and we find while scanning ExportedDroiddocDir.deps;
// ideally this should be read from prebuiltApis.properties.Extensions_*
@@ -650,26 +675,6 @@
}
})
- // Add all relevant --android-jar-pattern patterns for Metalava.
- // When parsing a stub jar for a specific version, Metalava picks the first pattern that defines
- // an actual file present on disk (in the order the patterns were passed). For system APIs for
- // privileged apps that are only defined since API level 21 (Lollipop), fallback to public stubs
- // for older releases. Similarly, module-lib falls back to system API.
- var sdkDirs []string
- switch proptools.StringDefault(d.properties.Api_levels_sdk_type, "public") {
- case "system-server":
- sdkDirs = []string{"system-server", "module-lib", "system", "public"}
- case "module-lib":
- sdkDirs = []string{"module-lib", "system", "public"}
- case "system":
- sdkDirs = []string{"system", "public"}
- case "public":
- sdkDirs = []string{"public"}
- default:
- ctx.PropertyErrorf("api_levels_sdk_type", "needs to be one of %v", allowedApiLevelSdkTypes)
- return
- }
-
for _, sdkDir := range sdkDirs {
for _, dir := range dirs {
cmd.FlagWithArg("--android-jar-pattern ", fmt.Sprintf("%s/%%/%s/%s", dir, sdkDir, filename))