Merge "Add dependency for material-design ui."
diff --git a/build/Android.mk b/build/Android.mk
index 4413638..f548c3d 100644
--- a/build/Android.mk
+++ b/build/Android.mk
@@ -122,6 +122,14 @@
 ALL_SDK_FILES += $(full_target)
 $(call dist-for-goals,sdk win_sdk,$(full_target):data/annotations.zip)
 
+# ======= Lint system API XML ===========
+full_target := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/framework-doc-system-stubs_generated-api-versions.xml
+$(call dist-for-goals,sdk win_sdk,$(full_target):system-data/api-versions.xml)
+
+# ======= Lint system Annotations zip ===========
+full_target := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/framework-doc-system-stubs_annotations.zip
+$(call dist-for-goals,sdk win_sdk,$(full_target):system-data/annotations.zip)
+
 # ============ SDK AIDL ============
 $(eval $(call copy-one-file,$(FRAMEWORK_AIDL),$(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/framework.aidl))
 ALL_SDK_FILES += $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/framework.aidl
diff --git a/scripts/update_crate_tests.py b/scripts/update_crate_tests.py
index 192f50e..7e13f62 100755
--- a/scripts/update_crate_tests.py
+++ b/scripts/update_crate_tests.py
@@ -181,17 +181,14 @@
           UpdaterException: the package does not appear to belong to the
             current repository.
         """
-        if path == None:
-            self.dir = os.getcwd()
-        else:
-            self.dir = path
+        self.dir = path
         try:
             self.dir_rel = self.dir.split(env.ANDROID_BUILD_TOP)[1]
         except IndexError:
             raise UpdaterException('The path ' + self.dir + ' is not under ' +
                             env.ANDROID_BUILD_TOP + '; You must be in the '
                             'directory of a crate or pass its absolute path '
-                            'as first argument.')
+                            'as the argument.')
 
         # Move to the package_directory.
         os.chdir(self.dir)
@@ -208,14 +205,14 @@
     Attributes:
       package: The package associated with this TEST_MAPPING file.
     """
-    def __init__(self, path):
+    def __init__(self, env, bazel, path):
         """Constructor.
 
         Args:
+          env: An instance of Env.
+          bazel: An instance of Bazel.
           path: The absolute path to the package.
         """
-        env = Env()
-        bazel = Bazel(env)
         self.package = Package(path, env, bazel)
 
     def create(self):
@@ -245,19 +242,22 @@
             json_file.write("// Generated by update_crate_tests.py for tests that depend on this crate.\n")
             json.dump(test_mapping, json_file, indent=2, separators=(',', ': '), sort_keys=True)
             json_file.write("\n")
-        print("TEST_MAPPING successfully updated!")
+        print("TEST_MAPPING successfully updated for %s!" % self.package.dir_rel)
 
 
 def main():
-    if len(sys.argv) == 2:
-        path = sys.argv[1]
+    if len(sys.argv) > 1:
+        paths = sys.argv[1:]
     else:
-        path = None
-    try:
-        test_mapping = TestMapping(path)
-    except UpdaterException as err:
-        sys.exit("Error: " + str(err))
-    test_mapping.create()
+        paths = [os.getcwd()]
+    env = Env()
+    bazel = Bazel(env)
+    for path in paths:
+        try:
+            test_mapping = TestMapping(env, bazel, path)
+        except UpdaterException as err:
+            sys.exit("Error: " + str(err))
+        test_mapping.create()
 
 if __name__ == '__main__':
   main()