AAPT2: Move to proto3
We're going to be using the Any proto field in ConfigDescription,
so migrate to proto3.
Test: make aapt2_tests
Change-Id: I43b91f4dfc448251f4352e48586b3b15502c033d
diff --git a/tools/aapt2/ResourcesInternal.proto b/tools/aapt2/ResourcesInternal.proto
index 3117917..17604e4 100644
--- a/tools/aapt2/ResourcesInternal.proto
+++ b/tools/aapt2/ResourcesInternal.proto
@@ -14,39 +14,39 @@
* limitations under the License.
*/
-syntax = "proto2";
-
-option java_package = "android.aapt.pb.internal";
-option optimize_for = LITE_RUNTIME;
+syntax = "proto3";
import "frameworks/base/tools/aapt2/Resources.proto";
package aapt.pb.internal;
+option java_package = "android.aapt.pb.internal";
+option optimize_for = LITE_RUNTIME;
+
// The top level message representing an external resource file (layout XML, PNG, etc).
// This is used to represent a compiled file before it is linked. Only useful to aapt2.
message CompiledFile {
message Symbol {
// The name of the symbol (in the form package:type/name).
- optional string resource_name = 1;
+ string resource_name = 1;
// The position in the file at which this symbol is defined. For debug use.
- optional aapt.pb.SourcePosition source = 2;
+ aapt.pb.SourcePosition source = 2;
}
// The name of the resource (in the form package:type/name).
- optional string resource_name = 1;
+ string resource_name = 1;
// The configuration for which the resource is defined.
- optional aapt.pb.ConfigDescription config = 2;
+ aapt.pb.ConfigDescription config = 2;
// The filesystem path to where the source file originated.
// Mainly used to display helpful error messages.
- optional string source_path = 3;
+ string source_path = 3;
// Any symbols this file auto-generates/exports (eg. @+id/foo in an XML file).
repeated Symbol exported_symbol = 4;
// If this is a compiled XML file, this is the root node.
- optional aapt.pb.XmlNode xml_root = 5;
+ aapt.pb.XmlNode xml_root = 5;
}