Loading tools/aapt2/Main.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ namespace aapt { static const char* sMajorVersion = "2"; // Update minor version whenever a feature or flag is added. static const char* sMinorVersion = "14"; static const char* sMinorVersion = "15"; int PrintVersion() { std::cerr << "Android Asset Packaging Tool (aapt) " << sMajorVersion << "." Loading tools/aapt2/cmd/Compile.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -114,6 +114,7 @@ struct CompileOptions { std::string output_path; Maybe<std::string> res_dir; bool pseudolocalize = false; bool no_png_crunch = false; bool legacy_mode = false; bool verbose = false; }; Loading Loading @@ -663,6 +664,7 @@ int Compile(const std::vector<StringPiece>& args, IDiagnostics* diagnostics) { "Generate resources for pseudo-locales " "(en-XA and ar-XB)", &options.pseudolocalize) .OptionalSwitch("--no-crunch", "Disables PNG processing", &options.no_png_crunch) .OptionalSwitch("--legacy", "Treat errors that used to be valid in AAPT as warnings", &options.legacy_mode) .OptionalSwitch("-v", "Enables verbose logging", &verbose); Loading Loading @@ -738,7 +740,8 @@ int Compile(const std::vector<StringPiece>& args, IDiagnostics* diagnostics) { if (!CompileXml(&context, options, path_data, archive_writer.get(), output_filename)) { error = true; } } else if (path_data.extension == "png" || path_data.extension == "9.png") { } else if (!options.no_png_crunch && (path_data.extension == "png" || path_data.extension == "9.png")) { if (!CompilePng(&context, options, path_data, archive_writer.get(), output_filename)) { error = true; } Loading tools/aapt2/readme.md +8 −0 Original line number Diff line number Diff line # Android Asset Packaging Tool 2.0 (AAPT2) release notes ## Version 2.15 ### `aapt2 compile ...` - Add `--no-crunch` option to avoid processing PNGs during the compile phase. Note that this shouldn't be used as a performance optimization, as once the PNG is processed, its result is cached for incremental linking. This should only be used if the developer has specially pre-processed the PNG and wants it byte-for-byte identical to the input. NOTE: 9-patches will not be processed correctly with this flag set. ## Version 2.14 ### `aapt2 link ...` - If an app is building with a minSdkVersion < 26 and a --package-id XX where XX > 7F, aapt2 Loading Loading
tools/aapt2/Main.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ namespace aapt { static const char* sMajorVersion = "2"; // Update minor version whenever a feature or flag is added. static const char* sMinorVersion = "14"; static const char* sMinorVersion = "15"; int PrintVersion() { std::cerr << "Android Asset Packaging Tool (aapt) " << sMajorVersion << "." Loading
tools/aapt2/cmd/Compile.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -114,6 +114,7 @@ struct CompileOptions { std::string output_path; Maybe<std::string> res_dir; bool pseudolocalize = false; bool no_png_crunch = false; bool legacy_mode = false; bool verbose = false; }; Loading Loading @@ -663,6 +664,7 @@ int Compile(const std::vector<StringPiece>& args, IDiagnostics* diagnostics) { "Generate resources for pseudo-locales " "(en-XA and ar-XB)", &options.pseudolocalize) .OptionalSwitch("--no-crunch", "Disables PNG processing", &options.no_png_crunch) .OptionalSwitch("--legacy", "Treat errors that used to be valid in AAPT as warnings", &options.legacy_mode) .OptionalSwitch("-v", "Enables verbose logging", &verbose); Loading Loading @@ -738,7 +740,8 @@ int Compile(const std::vector<StringPiece>& args, IDiagnostics* diagnostics) { if (!CompileXml(&context, options, path_data, archive_writer.get(), output_filename)) { error = true; } } else if (path_data.extension == "png" || path_data.extension == "9.png") { } else if (!options.no_png_crunch && (path_data.extension == "png" || path_data.extension == "9.png")) { if (!CompilePng(&context, options, path_data, archive_writer.get(), output_filename)) { error = true; } Loading
tools/aapt2/readme.md +8 −0 Original line number Diff line number Diff line # Android Asset Packaging Tool 2.0 (AAPT2) release notes ## Version 2.15 ### `aapt2 compile ...` - Add `--no-crunch` option to avoid processing PNGs during the compile phase. Note that this shouldn't be used as a performance optimization, as once the PNG is processed, its result is cached for incremental linking. This should only be used if the developer has specially pre-processed the PNG and wants it byte-for-byte identical to the input. NOTE: 9-patches will not be processed correctly with this flag set. ## Version 2.14 ### `aapt2 link ...` - If an app is building with a minSdkVersion < 26 and a --package-id XX where XX > 7F, aapt2 Loading