blob: 8fe414f4f660f2300384f4184a1e3357115214db [file] [log] [blame]
Ryan Mitchell833a1a62018-07-10 13:51:36 -07001/*
2 * Copyright (C) 2018 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
17#ifndef AAPT2_LINK_H
18#define AAPT2_LINK_H
19
Mark Punzalan5579cad2023-10-30 13:47:51 -070020#include <optional>
Izabela Orlowska0faba5f2018-06-01 12:06:31 +010021#include <regex>
Mark Punzalan5579cad2023-10-30 13:47:51 -070022#include <string>
23#include <unordered_map>
24#include <unordered_set>
25#include <vector>
Izabela Orlowska0faba5f2018-06-01 12:06:31 +010026
Ryan Mitchell833a1a62018-07-10 13:51:36 -070027#include "Command.h"
Ryan Mitchell833a1a62018-07-10 13:51:36 -070028#include "Resource.h"
Jeremy Meyer56f36e82022-05-20 20:35:42 +000029#include "androidfw/IDiagnostics.h"
Mark Punzalan5579cad2023-10-30 13:47:51 -070030#include "cmd/Util.h"
Ryan Mitchell833a1a62018-07-10 13:51:36 -070031#include "format/binary/TableFlattener.h"
Ryan Mitchellef9e6882019-06-24 11:53:33 -070032#include "format/proto/ProtoSerialize.h"
Ryan Mitchell833a1a62018-07-10 13:51:36 -070033#include "link/ManifestFixer.h"
Jeremy Meyer56f36e82022-05-20 20:35:42 +000034#include "split/TableSplitter.h"
Fabien Sanglard2d34e762019-02-21 15:13:29 -080035#include "trace/TraceBuffer.h"
Ryan Mitchell833a1a62018-07-10 13:51:36 -070036
37namespace aapt {
38
39enum class OutputFormat {
40 kApk,
41 kProto,
42};
43
44struct LinkOptions {
45 std::string output_path;
46 std::string manifest_path;
47 std::vector<std::string> include_paths;
48 std::vector<std::string> overlay_files;
49 std::vector<std::string> assets_dirs;
50 bool output_to_directory = false;
51 bool auto_add_overlay = false;
Donald Chai121c6e82019-06-12 12:51:57 -070052 bool override_styles_instead_of_overlaying = false;
Ryan Mitchell833a1a62018-07-10 13:51:36 -070053 OutputFormat output_format = OutputFormat::kApk;
Ryan Mitchell4382e442021-07-14 12:53:01 -070054 std::optional<std::string> rename_resources_package;
Ryan Mitchell833a1a62018-07-10 13:51:36 -070055
56 // Java/Proguard options.
Ryan Mitchell4382e442021-07-14 12:53:01 -070057 std::optional<std::string> generate_java_class_path;
58 std::optional<std::string> custom_java_package;
Ryan Mitchell833a1a62018-07-10 13:51:36 -070059 std::set<std::string> extra_java_packages;
Ryan Mitchell4382e442021-07-14 12:53:01 -070060 std::optional<std::string> generate_text_symbols_path;
61 std::optional<std::string> generate_proguard_rules_path;
62 std::optional<std::string> generate_main_dex_proguard_rules_path;
Ryan Mitchell833a1a62018-07-10 13:51:36 -070063 bool generate_conditional_proguard_rules = false;
Ryan Mitchell7e5236d2018-09-25 15:20:59 -070064 bool generate_minimal_proguard_rules = false;
Ryan Mitchell833a1a62018-07-10 13:51:36 -070065 bool generate_non_final_ids = false;
Jean-Luc Coelho181cbfd2019-11-27 12:37:48 -080066 bool no_proguard_location_reference = false;
Ryan Mitchell833a1a62018-07-10 13:51:36 -070067 std::vector<std::string> javadoc_annotations;
Ryan Mitchell4382e442021-07-14 12:53:01 -070068 std::optional<std::string> private_symbols;
Ryan Mitchell833a1a62018-07-10 13:51:36 -070069
70 // Optimizations/features.
71 bool no_auto_version = false;
72 bool no_version_vectors = false;
73 bool no_version_transitions = false;
74 bool no_resource_deduping = false;
Mårten Kongstadd8d29012018-06-11 14:13:37 +020075 bool no_resource_removal = false;
Ryan Mitchell833a1a62018-07-10 13:51:36 -070076 bool no_xml_namespaces = false;
77 bool do_not_compress_anything = false;
Iurii Makhnoda06e4d2022-08-24 14:17:32 +000078 bool use_sparse_encoding = false;
Ryan Mitchell833a1a62018-07-10 13:51:36 -070079 std::unordered_set<std::string> extensions_to_not_compress;
Ryan Mitchell4382e442021-07-14 12:53:01 -070080 std::optional<std::regex> regex_to_not_compress;
Mark Punzalan5579cad2023-10-30 13:47:51 -070081 FeatureFlagValues feature_flag_values;
Ryan Mitchell833a1a62018-07-10 13:51:36 -070082
83 // Static lib options.
84 bool no_static_lib_packages = false;
Izabela Orlowska84febea2019-06-03 18:34:12 +010085 bool merge_only = false;
Ryan Mitchell833a1a62018-07-10 13:51:36 -070086
87 // AndroidManifest.xml massaging options.
88 ManifestFixerOptions manifest_fixer_options;
89
90 // Products to use/filter on.
91 std::unordered_set<std::string> products;
92
93 // Flattening options.
94 TableFlattenerOptions table_flattener_options;
Ryan Mitchellef9e6882019-06-24 11:53:33 -070095 SerializeTableOptions proto_table_flattener_options;
Ryan Mitchell479fa392019-01-02 17:15:39 -080096 bool keep_raw_values = false;
Ryan Mitchell833a1a62018-07-10 13:51:36 -070097
98 // Split APK options.
99 TableSplitterOptions table_splitter_options;
100 std::vector<SplitConstraints> split_constraints;
101 std::vector<std::string> split_paths;
102
Winson3c918b82019-01-25 14:25:37 -0800103 // Configurations to exclude
104 std::vector<std::string> exclude_configs_;
105
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700106 // Stable ID options.
107 std::unordered_map<ResourceName, ResourceId> stable_id_map;
Ryan Mitchell4382e442021-07-14 12:53:01 -0700108 std::optional<std::string> resource_id_map_path;
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700109
110 // When 'true', allow reserved package IDs to be used for applications. Pre-O, the platform
111 // treats negative resource IDs [those with a package ID of 0x80 or higher] as invalid.
112 // In order to work around this limitation, we allow the use of traditionally reserved
113 // resource IDs [those between 0x02 and 0x7E].
114 bool allow_reserved_package_id = false;
115
116 // Whether we should fail on definitions of a resource with conflicting visibility.
117 bool strict_visibility = false;
118};
119
120class LinkCommand : public Command {
121 public:
Jeremy Meyer56f36e82022-05-20 20:35:42 +0000122 explicit LinkCommand(android::IDiagnostics* diag) : Command("link", "l"), diag_(diag) {
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700123 SetDescription("Links resources into an apk.");
Ryan Mitchell2c8fc862018-12-13 16:56:07 -0800124 AddRequiredFlag("-o", "Output path.", &options_.output_path, Command::kPath);
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700125 AddRequiredFlag("--manifest", "Path to the Android manifest to build.",
Ryan Mitchell2c8fc862018-12-13 16:56:07 -0800126 &options_.manifest_path, Command::kPath);
127 AddOptionalFlagList("-I", "Adds an Android APK to link against.", &options_.include_paths,
128 Command::kPath);
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700129 AddOptionalFlagList("-A", "An assets directory to include in the APK. These are unprocessed.",
Ryan Mitchell2c8fc862018-12-13 16:56:07 -0800130 &options_.assets_dirs, Command::kPath);
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700131 AddOptionalFlagList("-R", "Compilation unit to link, using `overlay` semantics.\n"
Ryan Mitchell2c8fc862018-12-13 16:56:07 -0800132 "The last conflicting resource given takes precedence.", &overlay_arg_list_,
133 Command::kPath);
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700134 AddOptionalFlag("--package-id",
135 "Specify the package ID to use for this app. Must be greater or equal to\n"
136 "0x7f and can't be used with --static-lib or --shared-lib.", &package_id_);
137 AddOptionalFlag("--java", "Directory in which to generate R.java.",
Ryan Mitchell2c8fc862018-12-13 16:56:07 -0800138 &options_.generate_java_class_path, Command::kPath);
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700139 AddOptionalFlag("--proguard", "Output file for generated Proguard rules.",
Ryan Mitchell2c8fc862018-12-13 16:56:07 -0800140 &options_.generate_proguard_rules_path, Command::kPath);
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700141 AddOptionalFlag("--proguard-main-dex",
142 "Output file for generated Proguard rules for the main dex.",
Ryan Mitchell2c8fc862018-12-13 16:56:07 -0800143 &options_.generate_main_dex_proguard_rules_path, Command::kPath);
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700144 AddOptionalSwitch("--proguard-conditional-keep-rules",
145 "Generate conditional Proguard keep rules.",
146 &options_.generate_conditional_proguard_rules);
Ryan Mitchell7e5236d2018-09-25 15:20:59 -0700147 AddOptionalSwitch("--proguard-minimal-keep-rules",
148 "Generate a minimal set of Proguard keep rules.",
149 &options_.generate_minimal_proguard_rules);
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700150 AddOptionalSwitch("--no-auto-version", "Disables automatic style and layout SDK versioning.",
151 &options_.no_auto_version);
152 AddOptionalSwitch("--no-version-vectors",
153 "Disables automatic versioning of vector drawables. Use this only\n"
154 "when building with vector drawable support library.",
155 &options_.no_version_vectors);
156 AddOptionalSwitch("--no-version-transitions",
157 "Disables automatic versioning of transition resources. Use this only\n"
158 "when building with transition support library.",
159 &options_.no_version_transitions);
160 AddOptionalSwitch("--no-resource-deduping", "Disables automatic deduping of resources with\n"
161 "identical values across compatible configurations.",
162 &options_.no_resource_deduping);
Mårten Kongstadd8d29012018-06-11 14:13:37 +0200163 AddOptionalSwitch("--no-resource-removal", "Disables automatic removal of resources without\n"
164 "defaults. Use this only when building runtime resource overlay packages.",
165 &options_.no_resource_removal);
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700166 AddOptionalSwitch("--enable-sparse-encoding",
Iurii Makhnoda06e4d2022-08-24 14:17:32 +0000167 "This decreases APK size at the cost of resource retrieval performance.",
168 &options_.use_sparse_encoding);
Eric Miao368cd192022-09-09 15:46:14 -0700169 AddOptionalSwitch("--enable-compact-entries",
170 "This decreases APK size by using compact resource entries for simple data types.",
171 &options_.table_flattener_options.use_compact_entries);
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700172 AddOptionalSwitch("-x", "Legacy flag that specifies to use the package identifier 0x01.",
173 &legacy_x_flag_);
174 AddOptionalSwitch("-z", "Require localization of strings marked 'suggested'.",
175 &require_localization_);
176 AddOptionalFlagList("-c",
177 "Comma separated list of configurations to include. The default\n"
178 "is all configurations.", &configs_);
179 AddOptionalFlag("--preferred-density",
180 "Selects the closest matching density and strips out all others.",
181 &preferred_density_);
182 AddOptionalFlag("--product", "Comma separated list of product names to keep", &product_list_);
183 AddOptionalSwitch("--output-to-dir", "Outputs the APK contents to a directory specified by -o.",
184 &options_.output_to_directory);
185 AddOptionalSwitch("--no-xml-namespaces", "Removes XML namespace prefix and URI information\n"
186 "from AndroidManifest.xml and XML binaries in res/*.",
187 &options_.no_xml_namespaces);
188 AddOptionalFlag("--min-sdk-version",
189 "Default minimum SDK version to use for AndroidManifest.xml.",
190 &options_.manifest_fixer_options.min_sdk_version_default);
191 AddOptionalFlag("--target-sdk-version",
192 "Default target SDK version to use for AndroidManifest.xml.",
193 &options_.manifest_fixer_options.target_sdk_version_default);
194 AddOptionalFlag("--version-code",
195 "Version code (integer) to inject into the AndroidManifest.xml if none is\n"
Ryan Mitchell704090e2018-07-31 14:59:25 -0700196 "present.", &options_.manifest_fixer_options.version_code_default);
197 AddOptionalFlag("--version-code-major",
198 "Version code major (integer) to inject into the AndroidManifest.xml if none is\n"
199 "present.", &options_.manifest_fixer_options.version_code_major_default);
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700200 AddOptionalFlag("--version-name",
201 "Version name to inject into the AndroidManifest.xml if none is present.",
202 &options_.manifest_fixer_options.version_name_default);
Rhed Jaob9ccb8a42020-11-30 21:42:16 +0800203 AddOptionalFlag("--revision-code",
204 "Revision code (integer) to inject into the AndroidManifest.xml if none is\n"
205 "present.", &options_.manifest_fixer_options.revision_code_default);
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700206 AddOptionalSwitch("--replace-version",
Rhed Jaob9ccb8a42020-11-30 21:42:16 +0800207 "If --version-code, --version-name, and/or --revision-code are specified, these\n"
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700208 "values will replace any value already in the manifest. By\n"
209 "default, nothing is changed if the manifest already defines\n"
210 "these attributes.",
211 &options_.manifest_fixer_options.replace_version);
212 AddOptionalFlag("--compile-sdk-version-code",
213 "Version code (integer) to inject into the AndroidManifest.xml if none is\n"
214 "present.",
215 &options_.manifest_fixer_options.compile_sdk_version);
216 AddOptionalFlag("--compile-sdk-version-name",
217 "Version name to inject into the AndroidManifest.xml if none is present.",
218 &options_.manifest_fixer_options.compile_sdk_version_codename);
Alan Viverette07287be2023-05-02 16:34:27 -0400219 AddOptionalSwitch(
220 "--no-compile-sdk-metadata",
221 "Suppresses output of compile SDK-related attributes in AndroidManifest.xml,\n"
222 "including android:compileSdkVersion and platformBuildVersion.",
223 &options_.manifest_fixer_options.no_compile_sdk_metadata);
Andrei Onea7109b702023-02-23 17:43:25 +0000224 AddOptionalFlagList("--fingerprint-prefix", "Fingerprint prefix to add to install constraints.",
225 &options_.manifest_fixer_options.fingerprint_prefixes);
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700226 AddOptionalSwitch("--shared-lib", "Generates a shared Android runtime library.",
227 &shared_lib_);
228 AddOptionalSwitch("--static-lib", "Generate a static Android library.", &static_lib_);
229 AddOptionalSwitch("--proto-format",
230 "Generates compiled resources in Protobuf format.\n"
231 "Suitable as input to the bundle tool for generating an App Bundle.",
232 &proto_format_);
233 AddOptionalSwitch("--no-static-lib-packages",
234 "Merge all library resources under the app's package.",
235 &options_.no_static_lib_packages);
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700236 AddOptionalSwitch("--non-final-ids",
237 "Generates R.java without the final modifier. This is implied when\n"
238 "--static-lib is specified.",
239 &options_.generate_non_final_ids);
Jean-Luc Coelho181cbfd2019-11-27 12:37:48 -0800240 AddOptionalSwitch("--no-proguard-location-reference",
241 "Keep proguard rules files from having a reference to the source file",
242 &options_.no_proguard_location_reference);
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700243 AddOptionalFlag("--stable-ids", "File containing a list of name to ID mapping.",
244 &stable_id_file_path_);
245 AddOptionalFlag("--emit-ids",
246 "Emit a file at the given path with a list of name to ID mappings,\n"
247 "suitable for use with --stable-ids.",
248 &options_.resource_id_map_path);
249 AddOptionalFlag("--private-symbols",
250 "Package name to use when generating R.java for private symbols.\n"
251 "If not specified, public and private symbols will use the application's\n"
252 "package name.",
253 &options_.private_symbols);
254 AddOptionalFlag("--custom-package", "Custom Java package under which to generate R.java.",
255 &options_.custom_java_package);
256 AddOptionalFlagList("--extra-packages",
257 "Generate the same R.java but with different package names.",
258 &extra_java_packages_);
259 AddOptionalFlagList("--add-javadoc-annotation",
260 "Adds a JavaDoc annotation to all generated Java classes.",
261 &options_.javadoc_annotations);
262 AddOptionalFlag("--output-text-symbols",
263 "Generates a text file containing the resource symbols of the R class in\n"
264 "the specified folder.",
265 &options_.generate_text_symbols_path);
266 AddOptionalSwitch("--allow-reserved-package-id",
267 "Allows the use of a reserved package ID. This should on be used for\n"
268 "packages with a pre-O min-sdk\n",
269 &options_.allow_reserved_package_id);
270 AddOptionalSwitch("--auto-add-overlay",
271 "Allows the addition of new resources in overlays without\n"
272 "<add-resource> tags.",
273 &options_.auto_add_overlay);
Donald Chai121c6e82019-06-12 12:51:57 -0700274 AddOptionalSwitch("--override-styles-instead-of-overlaying",
Ryan Mitchellef9e6882019-06-24 11:53:33 -0700275 "Causes styles defined in -R resources to replace previous definitions\n"
276 "instead of merging into them\n",
277 &options_.override_styles_instead_of_overlaying);
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700278 AddOptionalFlag("--rename-manifest-package", "Renames the package in AndroidManifest.xml.",
279 &options_.manifest_fixer_options.rename_manifest_package);
Ryan Mitchell60b74fb2020-02-26 12:45:39 -0800280 AddOptionalFlag("--rename-resources-package", "Renames the package in resources table",
281 &options_.rename_resources_package);
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700282 AddOptionalFlag("--rename-instrumentation-target-package",
283 "Changes the name of the target package for instrumentation. Most useful\n"
284 "when used in conjunction with --rename-manifest-package.",
285 &options_.manifest_fixer_options.rename_instrumentation_target_package);
Roshan Piusae12ce42020-04-25 16:08:55 -0700286 AddOptionalFlag("--rename-overlay-target-package",
287 "Changes the name of the target package for overlay. Most useful\n"
288 "when used in conjunction with --rename-manifest-package.",
289 &options_.manifest_fixer_options.rename_overlay_target_package);
Jeremy Meyer6b05b7d2022-09-30 22:22:24 +0000290 AddOptionalFlag("--rename-overlay-category", "Changes the category for the overlay.",
291 &options_.manifest_fixer_options.rename_overlay_category);
Ryan Mitchell81dfca0e2019-06-07 10:20:27 -0700292 AddOptionalFlagList("-0", "File suffix not to compress.",
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700293 &options_.extensions_to_not_compress);
294 AddOptionalSwitch("--no-compress", "Do not compress any resources.",
295 &options_.do_not_compress_anything);
Ryan Mitchell479fa392019-01-02 17:15:39 -0800296 AddOptionalSwitch("--keep-raw-values", "Preserve raw attribute values in xml files.",
297 &options_.keep_raw_values);
Izabela Orlowska0faba5f2018-06-01 12:06:31 +0100298 AddOptionalFlag("--no-compress-regex",
299 "Do not compress extensions matching the regular expression. Remember to\n"
Izabela Orlowska5b89b2d2019-11-27 18:37:09 +0000300 "use the '$' symbol for end of line. Uses a case-sensitive ECMAScript"
301 "regular expression grammar.",
Izabela Orlowska0faba5f2018-06-01 12:06:31 +0100302 &no_compress_regex);
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700303 AddOptionalSwitch("--warn-manifest-validation",
304 "Treat manifest validation errors as warnings.",
305 &options_.manifest_fixer_options.warn_validation);
306 AddOptionalFlagList("--split",
307 "Split resources matching a set of configs out to a Split APK.\n"
308 "Syntax: path/to/output.apk:<config>[,<config>[...]].\n"
309 "On Windows, use a semicolon ';' separator instead.",
310 &split_args_);
Winson3c918b82019-01-25 14:25:37 -0800311 AddOptionalFlagList("--exclude-configs",
312 "Excludes values of resources whose configs contain the specified qualifiers.",
313 &options_.exclude_configs_);
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700314 AddOptionalSwitch("--debug-mode",
315 "Inserts android:debuggable=\"true\" in to the application node of the\n"
316 "manifest, making the application debuggable even on production devices.",
317 &options_.manifest_fixer_options.debug_mode);
318 AddOptionalSwitch("--strict-visibility",
319 "Do not allow overlays with different visibility levels.",
320 &options_.strict_visibility);
Ryan Mitchellef9e6882019-06-24 11:53:33 -0700321 AddOptionalSwitch("--exclude-sources",
322 "Do not serialize source file information when generating resources in\n"
323 "Protobuf format.",
324 &options_.proto_table_flattener_options.exclude_sources);
325 AddOptionalFlag("--trace-folder",
326 "Generate systrace json trace fragment to specified folder.",
327 &trace_folder_);
Izabela Orlowska84febea2019-06-03 18:34:12 +0100328 AddOptionalSwitch("--merge-only",
Ryan Mitchellef9e6882019-06-24 11:53:33 -0700329 "Only merge the resources, without verifying resource references. This flag\n"
330 "should only be used together with the --static-lib flag.",
331 &options_.merge_only);
332 AddOptionalSwitch("-v", "Enables verbose logging.", &verbose_);
Mark Punzalan4b564de2024-01-05 02:17:20 -0800333 AddOptionalFlagList("--feature-flags",
334 "Specify the values of feature flags. The pairs in the argument\n"
335 "are separated by ',' and the name is separated from the value by '='.\n"
336 "Example: \"flag1=true,flag2=false,flag3=\" (flag3 has no given value).",
337 &feature_flags_args_);
Mark Punzalancc694e52024-04-02 20:43:23 +0000338 AddOptionalSwitch("--non-updatable-system",
339 "Mark the app as a non-updatable system app. This inserts\n"
340 "updatableSystem=\"false\" to the root manifest node, overwriting any\n"
341 "existing attribute. This is ignored if the manifest has a versionCode.",
342 &options_.manifest_fixer_options.non_updatable_system);
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700343 }
344
345 int Action(const std::vector<std::string>& args) override;
346
347 private:
Jeremy Meyer56f36e82022-05-20 20:35:42 +0000348 android::IDiagnostics* diag_;
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700349 LinkOptions options_;
350
351 std::vector<std::string> overlay_arg_list_;
352 std::vector<std::string> extra_java_packages_;
Ryan Mitchell4382e442021-07-14 12:53:01 -0700353 std::optional<std::string> package_id_;
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700354 std::vector<std::string> configs_;
Ryan Mitchell4382e442021-07-14 12:53:01 -0700355 std::optional<std::string> preferred_density_;
356 std::optional<std::string> product_list_;
357 std::optional<std::string> no_compress_regex;
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700358 bool legacy_x_flag_ = false;
359 bool require_localization_ = false;
360 bool verbose_ = false;
361 bool shared_lib_ = false;
362 bool static_lib_ = false;
363 bool proto_format_ = false;
Ryan Mitchell4382e442021-07-14 12:53:01 -0700364 std::optional<std::string> stable_id_file_path_;
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700365 std::vector<std::string> split_args_;
Ryan Mitchell4382e442021-07-14 12:53:01 -0700366 std::optional<std::string> trace_folder_;
Mark Punzalan297b85e2023-10-26 18:57:50 +0000367 std::vector<std::string> feature_flags_args_;
Ryan Mitchell833a1a62018-07-10 13:51:36 -0700368};
369
370}// namespace aapt
371
Mårten Kongstadd8d29012018-06-11 14:13:37 +0200372#endif //AAPT2_LINK_H