1// 2// Copyright (C) 2024 The Android Open-Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15 16syntax = "proto2"; 17package android.release_config_proto; 18option go_package = "android/soong/release_config/release_config_proto"; 19 20import "build_flags_src.proto"; 21 22// This protobuf file defines messages used to represent the release config for 23// the android build system, delivered as a build artifact for use by tools such 24// as Gantry. 25// 26// The following format requirements apply across various message fields: 27// 28// # name: name of the flag 29// 30// format: an uppercase string in SNAKE_CASE format starting with RELEASE_, 31// no consecutive underscores, and no leading digit. For example 32// RELEASE_MY_PACKAGE_FLAG is a valid name, while MY_PACKAGE_FLAG, and 33// RELEASE_MY_PACKAGE__FLAG are invalid. 34// 35// # package: package to which the flag belongs 36// 37// format: lowercase strings in snake_case format, delimited by dots, no 38// consecutive underscores and no leading digit in each string. For example 39// com.android.mypackage is a valid name while com.android.myPackage, 40// com.android.1mypackage are invalid 41 42message tracepoint { 43 // Path to declaration or value file relative to $TOP 44 optional string source = 1; 45 optional value value = 201; 46} 47 48message flag_artifact { 49 // The original declaration 50 optional flag_declaration flag_declaration = 1; 51 52 // Value for the flag 53 optional value value = 201; 54 55 // Trace of where the flag value was assigned. 56 repeated tracepoint traces = 8; 57} 58 59message flag_artifacts { 60 // The artifacts 61 repeated flag_artifact flag_artifacts = 1; 62} 63 64message release_config_artifact { 65 // The name of the release config. 66 // See # name for format detail 67 optional string name = 1; 68 69 // Other names by which this release is known (for example, `next`) 70 repeated string other_names = 2; 71 72 // The complete set of build flags in this release config, after all 73 // inheritance and other processing is complete. 74 repeated flag_artifact flag_artifacts = 3; 75 76 // The (complete) list of aconfig_value_sets Soong modules to use. 77 repeated string aconfig_value_sets = 4; 78 79 // The names of the release_config_artifacts from which we inherited. 80 // Included for reference only. 81 repeated string inherits = 5; 82 83 // The release config directories used for this config. 84 // For example, "build/release". 85 repeated string directories = 6; 86 87 // Prior stage(s) for flag advancement (during development). 88 // Once a flag has met criteria in a prior stage, it can advance to this one. 89 repeated string prior_stages = 7; 90} 91 92message release_configs_artifact { 93 // The active release config for this build. 94 optional release_config_artifact release_config = 1; 95 96 // All other release configs defined for this TARGET_PRODUCT. 97 repeated release_config_artifact other_release_configs = 2; 98 99 // Map of release_config_artifact.directories to release_config_map message. 100 map<string, release_config_map> release_config_maps_map = 3; 101} 102 103