diff options
Diffstat (limited to 'cmd/release_config/release_config_proto/build_flags_src.proto')
| -rw-r--r-- | cmd/release_config/release_config_proto/build_flags_src.proto | 151 |
1 files changed, 151 insertions, 0 deletions
diff --git a/cmd/release_config/release_config_proto/build_flags_src.proto b/cmd/release_config/release_config_proto/build_flags_src.proto new file mode 100644 index 000000000..0ef1a5ffa --- /dev/null +++ b/cmd/release_config/release_config_proto/build_flags_src.proto @@ -0,0 +1,151 @@ +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto2"; +package android.release_config_proto; +option go_package = "android/soong/release_config/release_config_proto"; + +// This protobuf file defines messages used to represent the build flags used by +// a release in a more human-editable form. It is used for on-disk files in the +// source tree. +// +// The following format requirements apply across various message fields: +// +// # name: name of the flag +// +// format: an uppercase string in SNAKE_CASE format starting with RELEASE_, +// no consecutive underscores, and no leading digit. For example +// RELEASE_MY_PACKAGE_FLAG is a valid name, while MY_PACKAGE_FLAG, and +// RELEASE_MY_PACKAGE__FLAG are invalid. +// +// # namespace: namespace the flag belongs to +// +// format: a lowercase string in snake_case format, no consecutive underscores, and no leading +// digit. For example android_bar_system +// +// # package: package to which the flag belongs +// +// format: lowercase strings in snake_case format, delimited by dots, no +// consecutive underscores and no leading digit in each string. For example +// com.android.mypackage is a valid name while com.android.myPackage, +// com.android.1mypackage are invalid + +enum workflow { + UNSPECIFIED_workflow = 0; + + // Boolean value flags that progress from false to true. + LAUNCH = 1; + + // String value flags that get updated with new version strings to control + // prebuilt inclusion. + PREBUILT = 2; + + // Manually managed outside flags. These are likely to be found in a + // different directory than flags with other workflows. + MANUAL = 3; +} + +message value { + oneof val { + bool unspecified_value = 200; + string string_value = 201; + bool bool_value = 202; + // If true, the flag is obsolete. Assigning it further will be flagged. + bool obsolete = 203; + } +} + +// The proto used in the source tree. +message flag_declaration { + // The name of the flag. + // See # name for format detail + optional string name = 1; + + // Namespace the flag belongs to (required) + // See # namespace for format detail + optional string namespace = 2; + + // Text description of the flag's purpose. + optional string description = 3; + + // reserve this for bug, if needed. + reserved 4; + + // Value for the flag + optional value value = 201; + + // Workflow for this flag. + optional workflow workflow = 205; + + // The container for this flag. This overrides any default container given + // in the release_config_map message. + repeated string containers = 206; + + // The package associated with this flag. + // (when Gantry is ready for it) optional string package = 207; + reserved 207; +} + +message flag_value { + // Name of the flag. + // See # name for format detail + optional string name = 2; + + // Value for the flag + optional value value = 201; + + // If true, the flag is completely removed from the release config as if + // never declared. + optional bool redacted = 202; +} + +// This replaces $(call declare-release-config). +message release_config { + // The name of the release config. + // See # name for format detail + optional string name = 1; + + // From which other release configs does this one inherit? + repeated string inherits = 2; + + // List of names of the aconfig_value_set soong module(s) for this + // contribution. + repeated string aconfig_value_sets = 3; + + // Only aconfig flags are allowed in this release config. + optional bool aconfig_flags_only = 4; +} + +// Any aliases. These are used for continuous integration builder config. +message release_alias { + // The name of the alias. + optional string name = 1; + + // The release that `name` is an alias for. + optional string target = 2; +} + +// This provides the data from release_config_map.mk +message release_config_map { + // Any aliases. + repeated release_alias aliases = 1; + + // Description of this map and its intended use. + optional string description = 2; + + // The default container for flags declared here. + repeated string default_containers = 3; + + // If needed, we can add these fields instead of hardcoding the location. + // Flag declarations: `flag_declarations/*.textproto` + // Release config contributions: `release_configs/*.textproto` + // Flag values: `flag_values/{RELEASE_NAME}/*.textproto` +} |
