• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2022 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
19package aapt.pb;
20
21option java_package = "com.android.aapt";
22option java_multiple_files = true;
23
24message ResourceMappings {
25  ShortenedPathsMap shortened_paths = 1;
26  CollapsedNamesMap collapsed_names = 2;
27}
28
29// Metadata relating to "aapt2 optimize --shorten-resource-paths"
30message ShortenedPathsMap {
31  // Maps shorted paths (e.g. "res/foo.xml") to their original names (e.g.
32  // "res/xml/file_with_long_name.xml").
33  message ResourcePathMapping {
34    string shortened_path = 1;
35    string original_path = 2;
36  }
37  repeated ResourcePathMapping resource_paths = 1;
38}
39
40// Metadata relating to "aapt2 optimize --collapse-resource-names"
41message CollapsedNamesMap {
42  // Maps resource IDs (e.g. 0x7f123456) to their original names (e.g.
43  // "package:type/entry").
44  message ResourceNameMapping {
45    uint32 id = 1;
46    string name = 2;
47  }
48  repeated ResourceNameMapping resource_names = 1;
49}
50