Add a system variant of the merged annotations

This is going to be disted instead of the monolithic one being
used currently.

Bug: 235140934
Test: m sdk-annotations{,-system}.zip and diff; manual spot checking
Test: m sdk dist && diff out/dist/system-data/annotations.zip with this
Change-Id: I9874f88e933a8b804a73638e6bac7a9d312c7c9f
diff --git a/api/Android.bp b/api/Android.bp
index 9a14ee6..3fc3991 100644
--- a/api/Android.bp
+++ b/api/Android.bp
@@ -190,12 +190,8 @@
 
 // This produces the same annotations.zip as framework-doc-stubs, but by using
 // outputs from individual modules instead of all the source code.
-genrule {
-    name: "sdk-annotations.zip",
-    srcs: [
-        ":android-non-updatable-doc-stubs{.annotations.zip}",
-        ":all-modules-public-annotations",
-    ],
+genrule_defaults {
+    name: "sdk-annotations-defaults",
     out: ["annotations.zip"],
     tools: [
         "merge_annotation_zips",
@@ -206,6 +202,24 @@
 }
 
 genrule {
+    name: "sdk-annotations.zip",
+    defaults: ["sdk-annotations-defaults"],
+    srcs: [
+        ":android-non-updatable-doc-stubs{.annotations.zip}",
+        ":all-modules-public-annotations",
+    ],
+}
+
+genrule {
+    name: "sdk-annotations-system.zip",
+    defaults: ["sdk-annotations-defaults"],
+    srcs: [
+        ":android-non-updatable-doc-stubs-system{.annotations.zip}",
+        ":all-modules-system-annotations",
+    ],
+}
+
+genrule {
     name: "combined-removed-dex",
     visibility: [
         "//frameworks/base/boot",