Create aapt2_artifacts dist goal for aapt2

Building aapt2_artifacts will output aapt2 and aapt2-protos.zip to
DIST_DIR. If BUILD_HOST_static is not specified, aapt2.exe will also
be built.

Bug: 147476179
Test: m -j dist DIST_DIR=~/dist_test aapt2_artifacts
Test: m -j dist DIST_DIR=~/dist_test BUILD_HOST_static=1 \
      aapt2_artifacts
Change-Id: I9a0ee769f8c6579f1e01c04e42c62ebe850ba401
diff --git a/tools/aapt2/Android.bp b/tools/aapt2/Android.bp
index c1d05e4..7d2607f 100644
--- a/tools/aapt2/Android.bp
+++ b/tools/aapt2/Android.bp
@@ -201,6 +201,9 @@
     use_version_lib: true,
     static_libs: ["libaapt2"],
     defaults: ["aapt2_defaults"],
+    dist: {
+        targets: ["aapt2_artifacts"],
+    },
 }
 
 // ==========================================================
@@ -219,6 +222,6 @@
         "cp $(in) $(genDir)/protos && " +
         "$(location :soong_zip) -o $(out) -C $(genDir)/protos -D $(genDir)/protos",
     dist: {
-        targets: ["sdk_repo"],
+        targets: ["sdk_repo", "aapt2_artifacts"],
     },
 }