blob: 520b242ee50947cd738c55f7bcfc957e8aca869c [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";
25option optimize_for = LITE_RUNTIME;
26
Adam Lesinski4ffea042017-08-10 15:37:28 -070027// 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).
Adam Lesinski5bd44232017-09-07 09:39:07 -070032 string resource_name = 1;
Adam Lesinski4ffea042017-08-10 15:37:28 -070033
34 // The position in the file at which this symbol is defined. For debug use.
Adam Lesinski5bd44232017-09-07 09:39:07 -070035 aapt.pb.SourcePosition source = 2;
Adam Lesinski4ffea042017-08-10 15:37:28 -070036 }
37
38 // The name of the resource (in the form package:type/name).
Adam Lesinski5bd44232017-09-07 09:39:07 -070039 string resource_name = 1;
Adam Lesinski4ffea042017-08-10 15:37:28 -070040
41 // The configuration for which the resource is defined.
Adam Lesinskib58c3ef2017-09-12 17:39:52 -070042 aapt.pb.Configuration config = 2;
Adam Lesinski4ffea042017-08-10 15:37:28 -070043
Adam Lesinskie59f0d82017-10-13 09:36:53 -070044 // The type of the file.
45 aapt.pb.FileReference.Type type = 3;
Adam Lesinski00451162017-10-03 07:44:08 -070046
Adam Lesinski4ffea042017-08-10 15:37:28 -070047 // The filesystem path to where the source file originated.
48 // Mainly used to display helpful error messages.
Adam Lesinski00451162017-10-03 07:44:08 -070049 string source_path = 4;
Adam Lesinski4ffea042017-08-10 15:37:28 -070050
51 // Any symbols this file auto-generates/exports (eg. @+id/foo in an XML file).
Adam Lesinski00451162017-10-03 07:44:08 -070052 repeated Symbol exported_symbol = 5;
Adam Lesinski4ffea042017-08-10 15:37:28 -070053}