blob: b0ed3da333686901f5bda22e46064b4545d54ee5 [file] [log] [blame]
Adam Lesinski4ffea042017-08-10 15:37:28 -07001/*
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
Adam Lesinski5bd44232017-09-07 09:39:07 -070017syntax = "proto3";
Adam Lesinski4ffea042017-08-10 15:37:28 -070018
Adam Lesinskib58c3ef2017-09-12 17:39:52 -070019import "frameworks/base/tools/aapt2/Configuration.proto";
Adam Lesinski4ffea042017-08-10 15:37:28 -070020import "frameworks/base/tools/aapt2/Resources.proto";
21
22package aapt.pb.internal;
23
Adam Lesinski5bd44232017-09-07 09:39:07 -070024option java_package = "android.aapt.pb.internal";
Adam Lesinski5bd44232017-09-07 09:39:07 -070025
Adam Lesinski4ffea042017-08-10 15:37:28 -070026// The top level message representing an external resource file (layout XML, PNG, etc).
27// This is used to represent a compiled file before it is linked. Only useful to aapt2.
28message CompiledFile {
29 message Symbol {
30 // The name of the symbol (in the form package:type/name).
Adam Lesinski5bd44232017-09-07 09:39:07 -070031 string resource_name = 1;
Adam Lesinski4ffea042017-08-10 15:37:28 -070032
33 // The position in the file at which this symbol is defined. For debug use.
Adam Lesinski5bd44232017-09-07 09:39:07 -070034 aapt.pb.SourcePosition source = 2;
Adam Lesinski4ffea042017-08-10 15:37:28 -070035 }
36
37 // The name of the resource (in the form package:type/name).
Adam Lesinski5bd44232017-09-07 09:39:07 -070038 string resource_name = 1;
Adam Lesinski4ffea042017-08-10 15:37:28 -070039
40 // The configuration for which the resource is defined.
Adam Lesinskib58c3ef2017-09-12 17:39:52 -070041 aapt.pb.Configuration config = 2;
Adam Lesinski4ffea042017-08-10 15:37:28 -070042
Adam Lesinskie59f0d82017-10-13 09:36:53 -070043 // The type of the file.
44 aapt.pb.FileReference.Type type = 3;
Adam Lesinski00451162017-10-03 07:44:08 -070045
Adam Lesinski4ffea042017-08-10 15:37:28 -070046 // The filesystem path to where the source file originated.
47 // Mainly used to display helpful error messages.
Adam Lesinski00451162017-10-03 07:44:08 -070048 string source_path = 4;
Adam Lesinski4ffea042017-08-10 15:37:28 -070049
50 // Any symbols this file auto-generates/exports (eg. @+id/foo in an XML file).
Adam Lesinski00451162017-10-03 07:44:08 -070051 repeated Symbol exported_symbol = 5;
Adam Lesinski4ffea042017-08-10 15:37:28 -070052}