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/api.go b/api/api.go
index 2212000..bf6b085 100644
--- a/api/api.go
+++ b/api/api.go
@@ -155,6 +155,13 @@
 	ctx.CreateModule(android.FileGroupFactory, &props)
 }
 
+func createMergedSystemAnnotationsFilegroup(ctx android.LoadHookContext, modules []string) {
+	props := fgProps{}
+	props.Name = proptools.StringPtr("all-modules-system-annotations")
+	props.Srcs = createSrcs(modules, "{.system.annotations.zip}")
+	ctx.CreateModule(android.FileGroupFactory, &props)
+}
+
 func createFilteredApiVersions(ctx android.LoadHookContext, modules []string) {
 	// For the filtered api versions, we prune all APIs except art module's APIs. because
 	// 1) ART apis are available by default to all modules, while other module-to-module deps are
@@ -294,6 +301,7 @@
 	createMergedFrameworkImpl(ctx, bootclasspath)
 
 	createMergedPublicAnnotationsFilegroup(ctx, bootclasspath)
+	createMergedSystemAnnotationsFilegroup(ctx, bootclasspath)
 
 	createFilteredApiVersions(ctx, bootclasspath)