OSDN Git Service

Add build rule for API->source mapping.
authorMathew Inwood <mathewi@google.com>
Fri, 22 Jun 2018 14:30:02 +0000 (15:30 +0100)
committerMathew Inwood <mathewi@google.com>
Tue, 10 Jul 2018 08:20:42 +0000 (09:20 +0100)
This is used to get source positions of all class members in the boot
class path, to automate the addition of annotations. See
go/hidden-api-annotations for more context.

Mappings printed in:
out/soong/.intermediates/frameworks/base/hiddenapi-mappings
    /android_common/dex-mapping.txt

Test: make hiddenapi-mappings
Bug: 110868826
Change-Id: Ie67a8be6a5a71447a25d081bd466b8b5e01b0725

Android.bp

index f11b6fe..599464f 100644 (file)
@@ -1050,6 +1050,24 @@ droiddoc {
           " -showAnnotation android.annotation.TestApi",
 }
 
+droiddoc {
+    name: "hiddenapi-mappings",
+    defaults: ["framework-docs-default"],
+    arg_files: [
+        "core/res/AndroidManifest.xml",
+        ":api-version-xml",
+        "core/java/overview.html",
+        ":current-support-api",
+    ],
+    dex_mapping_filename: "dex-mapping.txt",
+    args: framework_docs_args +
+          " -referenceonly" +
+          " -nodocs" +
+          " -showUnannotated" +
+          " -showAnnotation android.annotation.SystemApi" +
+          " -showAnnotation android.annotation.TestApi",
+}
+
 filegroup {
     name: "apache-http-stubs-sources",
     srcs: [