Loading tools/aapt2/Main.cpp +15 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,18 @@ namespace aapt { // DO NOT UPDATE, this is more of a marketing version. static const char* sMajorVersion = "2"; // Update minor version whenever a feature or flag is added. static const char* sMinorVersion = "0"; int printVersion() { std::cerr << "Android Asset Packaging Tool (aapt) " << sMajorVersion << "." << sMinorVersion << std::endl; return 0; } extern int compile(const std::vector<StringPiece>& args); extern int link(const std::vector<StringPiece>& args); extern int dump(const std::vector<StringPiece>& args); Loading @@ -47,12 +59,14 @@ int main(int argc, char** argv) { return aapt::dump(args); } else if (command == "diff") { return aapt::diff(args); } else if (command == "version") { return aapt::printVersion(); } std::cerr << "unknown command '" << command << "'\n"; } else { std::cerr << "no command specified\n"; } std::cerr << "\nusage: aapt2 [compile|link|dump|diff] ..." << std::endl; std::cerr << "\nusage: aapt2 [compile|link|dump|diff|version] ..." << std::endl; return 1; } tools/aapt2/readme.md 0 → 100644 +18 −0 Original line number Diff line number Diff line # Android Asset Packaging Tool 2.0 (AAPT2) release notes ## Version 2.0 ### `aapt2 compile ...` - Pseudo-localization: generates pseudolocalized versions of default strings when the `--pseudo-localize` option is specified. - Legacy mode: treats some class of errors as warnings in order to be more compatible with AAPT when `--legacy` is specified. - Compile directory: treats the input file as a directory when `--dir` is specified. This will emit a zip of compiled files, one for each file in the directory. The directory must follow the Android resource directory structure (res/values-[qualifiers]/file.ext). ### `aapt2 link ...` - Automatic attribute versioning: adds version qualifiers to resources that use attributes introduced in a later SDK level. This can be disabled with `--no-auto-version`. - Min SDK resource filtering: removes resources that can't possibly be selected at runtime due to the application's minimum supported SDK level. Loading
tools/aapt2/Main.cpp +15 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,18 @@ namespace aapt { // DO NOT UPDATE, this is more of a marketing version. static const char* sMajorVersion = "2"; // Update minor version whenever a feature or flag is added. static const char* sMinorVersion = "0"; int printVersion() { std::cerr << "Android Asset Packaging Tool (aapt) " << sMajorVersion << "." << sMinorVersion << std::endl; return 0; } extern int compile(const std::vector<StringPiece>& args); extern int link(const std::vector<StringPiece>& args); extern int dump(const std::vector<StringPiece>& args); Loading @@ -47,12 +59,14 @@ int main(int argc, char** argv) { return aapt::dump(args); } else if (command == "diff") { return aapt::diff(args); } else if (command == "version") { return aapt::printVersion(); } std::cerr << "unknown command '" << command << "'\n"; } else { std::cerr << "no command specified\n"; } std::cerr << "\nusage: aapt2 [compile|link|dump|diff] ..." << std::endl; std::cerr << "\nusage: aapt2 [compile|link|dump|diff|version] ..." << std::endl; return 1; }
tools/aapt2/readme.md 0 → 100644 +18 −0 Original line number Diff line number Diff line # Android Asset Packaging Tool 2.0 (AAPT2) release notes ## Version 2.0 ### `aapt2 compile ...` - Pseudo-localization: generates pseudolocalized versions of default strings when the `--pseudo-localize` option is specified. - Legacy mode: treats some class of errors as warnings in order to be more compatible with AAPT when `--legacy` is specified. - Compile directory: treats the input file as a directory when `--dir` is specified. This will emit a zip of compiled files, one for each file in the directory. The directory must follow the Android resource directory structure (res/values-[qualifiers]/file.ext). ### `aapt2 link ...` - Automatic attribute versioning: adds version qualifiers to resources that use attributes introduced in a later SDK level. This can be disabled with `--no-auto-version`. - Min SDK resource filtering: removes resources that can't possibly be selected at runtime due to the application's minimum supported SDK level.