1/*
2 * Copyright (C) 2016 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 */
16
17syntax = "proto3";
18
19import "frameworks/base/tools/aapt2/Configuration.proto";
20import "frameworks/base/tools/aapt2/Resources.proto";
21
22package aapt.pb.internal;
23
24option java_package = "android.aapt.pb.internal";
25option optimize_for = LITE_RUNTIME;
26
27// The top level message representing an external resource file (layout XML, PNG, etc).
28// This is used to represent a compiled file before it is linked. Only useful to aapt2.
29message CompiledFile {
30  message Symbol {
31    // The name of the symbol (in the form package:type/name).
32    string resource_name = 1;
33
34    // The position in the file at which this symbol is defined. For debug use.
35    aapt.pb.SourcePosition source = 2;
36  }
37
38  // The name of the resource (in the form package:type/name).
39  string resource_name = 1;
40
41  // The configuration for which the resource is defined.
42  aapt.pb.Configuration config = 2;
43
44  // The type of the file.
45  aapt.pb.FileReference.Type type = 3;
46
47  // The filesystem path to where the source file originated.
48  // Mainly used to display helpful error messages.
49  string source_path = 4;
50
51  // Any symbols this file auto-generates/exports (eg. @+id/foo in an XML file).
52  repeated Symbol exported_symbol = 5;
53}
54