summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Anton Hansson <hansson@google.com> 2021-09-24 13:16:19 +0100
committer Anton Hansson <hansson@google.com> 2021-09-30 18:57:31 +0100
commitbab3cc34de78f7e737990a5f10a5c8341a26e30c (patch)
treef16d52db7d7f8fdab048dd670bef1b266c6dac80
parent5ae099b9778308602aad4a63c8dccf3405d1b70b (diff)
Add build rule to merge annotation zips
This target produces nearly identical contents to the build target framework-doc-stubs (the only diffs are in whitespace). Using this module in the SDK zip will allow changing the inputs of framework-doc-stubs to java sources that don't have all the annotations (the jar stubs). Bug: 187397779 Test: m sdk-annotations.zip and diff with framework-doc-stubs zip Change-Id: Id163473c455f25c5f31c965d907c0c3b0e7755fc
-rw-r--r--ApiDocs.bp36
1 files changed, 36 insertions, 0 deletions
diff --git a/ApiDocs.bp b/ApiDocs.bp
index c1816467146d..a926ddc218a6 100644
--- a/ApiDocs.bp
+++ b/ApiDocs.bp
@@ -192,6 +192,42 @@ droidstubs {
},
}
+// 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}",
+
+ // Conscrypt and i18n currently do not enable annotations
+ // ":conscrypt.module.public.api{.public.annotations.zip}",
+ // ":i18n.module.public.api{.public.annotations.zip}",
+
+ // Modules that enable annotations below
+ ":android.net.ipsec.ike{.public.annotations.zip}",
+ ":art.module.public.api{.public.annotations.zip}",
+ ":framework-appsearch{.public.annotations.zip}",
+ ":framework-connectivity{.public.annotations.zip}",
+ ":framework-graphics{.public.annotations.zip}",
+ ":framework-media{.public.annotations.zip}",
+ ":framework-mediaprovider{.public.annotations.zip}",
+ ":framework-permission{.public.annotations.zip}",
+ ":framework-permission-s{.public.annotations.zip}",
+ ":framework-scheduling{.public.annotations.zip}",
+ ":framework-sdkextensions{.public.annotations.zip}",
+ ":framework-statsd{.public.annotations.zip}",
+ ":framework-tethering{.public.annotations.zip}",
+ ":framework-wifi{.public.annotations.zip}",
+ ],
+ out: ["annotations.zip"],
+ tools: [
+ "merge_annotation_zips",
+ "soong_zip",
+ ],
+ cmd: "$(location merge_annotation_zips) $(genDir)/out $(in) && " +
+ "$(location soong_zip) -o $(out) -C $(genDir)/out -D $(genDir)/out",
+}
+
/////////////////////////////////////////////////////////////////////
// API docs are created from the generated stub source files
// using droiddoc