AAPT2: Add version info and release notes

Bug:30402888
Change-Id: Idb532cc71921eb1cfba31c00a6fb7108e31fddd8
diff --git a/tools/aapt2/Main.cpp b/tools/aapt2/Main.cpp
index 00d8aae..a74b5aa 100644
--- a/tools/aapt2/Main.cpp
+++ b/tools/aapt2/Main.cpp
@@ -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);
@@ -47,12 +59,14 @@
             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;
 }
diff --git a/tools/aapt2/readme.md b/tools/aapt2/readme.md
new file mode 100644
index 0000000..95c0173
--- /dev/null
+++ b/tools/aapt2/readme.md
@@ -0,0 +1,18 @@
+# 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.