Revert "Revert "Add offline/online-sdk-docs in Soong.""
This reverts commit 3c47f131d342fd0d3cfb0104610300f97d3cbfbd.
Reason for revert:
Add offline/online-sdk-docs in Soong, attempt 2.
This is the second attempt to merge this CL topic.
The first attempt failed because <sdk.atree failed to find docs/*.txt files>.
This CL fixes this by <go/ag/4636078, go/ag/4636072>
Test: m -j out/target/common/docs/offline-sdk-timestamp
Bug: b/70351683
Change-Id: I338abfcfd3a15ce54436732f0d70c693a7e063c5
diff --git a/Android.bp b/Android.bp
index ae91a09..6a3e56c 100644
--- a/Android.bp
+++ b/Android.bp
@@ -996,6 +996,7 @@
"-since $(location 26/public/api/android.txt) 26 " +
"-since $(location 27/public/api/android.txt) 27 " +
"-since $(location 28/public/api/android.txt) 28 " +
+ "-since $(location api/current.txt) Q " +
"-werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " +
"-overview $(location core/java/overview.html) " +
// Federate Support Library references against local API file.
@@ -1003,7 +1004,7 @@
"-federationapi SupportLib $(location current/support-api.txt) "
doc_defaults {
- name: "framework-docs-default",
+ name: "api-stubs-default",
srcs: [
":opt-telephony-srcs",
":opt-net-voip-srcs",
@@ -1053,7 +1054,7 @@
droiddoc {
name: "api-stubs-docs",
- defaults: ["framework-docs-default"],
+ defaults: ["api-stubs-default"],
arg_files: [
"core/res/AndroidManifest.xml",
":api-version-xml",
@@ -1086,7 +1087,7 @@
droiddoc {
name: "system-api-stubs-docs",
- defaults: ["framework-docs-default"],
+ defaults: ["api-stubs-default"],
arg_files: [
"core/res/AndroidManifest.xml",
":api-version-xml",
@@ -1120,7 +1121,7 @@
droiddoc {
name: "test-api-stubs-docs",
- defaults: ["framework-docs-default"],
+ defaults: ["api-stubs-default"],
arg_files: [
"core/res/AndroidManifest.xml",
":api-version-xml",
@@ -1145,6 +1146,286 @@
},
}
+doc_defaults {
+ name: "framework-docs-default",
+ srcs: [
+ "test-base/src/**/*.java",
+ ":opt-telephony-srcs",
+ ":opt-net-voip-srcs",
+ ":openjdk_javadoc_files",
+ ":non_openjdk_javadoc_files",
+ ":android_icu4j_src_files_for_docs",
+ ":gen-ojluni-jaif-annotated-srcs",
+ "test-mock/src/**/*.java",
+ "test-runner/src/**/*.java",
+ ],
+ exclude_srcs: [
+ ":annotated_ojluni_files",
+ ],
+ srcs_lib: "framework",
+ srcs_lib_whitelist_dirs: frameworks_base_subdirs,
+ srcs_lib_whitelist_pkgs: packages_to_document,
+ libs: [
+ "voip-common",
+ "android.test.mock",
+ "android-support-annotations",
+ "android-support-compat",
+ "android-support-core-ui",
+ "android-support-core-utils",
+ "android-support-customtabs",
+ "android-support-design",
+ "android-support-dynamic-animation",
+ "android-support-exifinterface",
+ "android-support-fragment",
+ "android-support-media-compat",
+ "android-support-percent",
+ "android-support-recommendation",
+ "android-support-transition",
+ "android-support-tv-provider",
+ "android-support-v7-cardview",
+ "android-support-v7-gridlayout",
+ "android-support-v7-mediarouter",
+ "android-support-v7-palette",
+ "android-support-v7-preference",
+ "android-support-v13",
+ "android-support-v14-preference",
+ "android-support-v17-leanback",
+ "android-support-v17-preference-leanback",
+ "android-support-wear",
+ "android-support-vectordrawable",
+ "android-support-animatedvectordrawable",
+ "android-support-v7-appcompat",
+ "android-support-v7-recyclerview",
+ "android-support-emoji",
+ "android-support-emoji-appcompat",
+ "android-support-emoji-bundled",
+ "android-support-v8-renderscript",
+ "android-support-multidex",
+ "android-support-multidex-instrumentation",
+ ],
+ local_sourcepaths: frameworks_base_subdirs,
+ html_dirs: [
+ "docs/html",
+ ],
+ knowntags: [
+ "docs/knowntags.txt",
+ ":known-oj-tags",
+ ],
+ custom_template: "droiddoc-templates-sdk",
+ resourcesdir: "docs/html/reference/images/",
+ resourcesoutdir: "reference/android/images/",
+ hdf: [
+ "dac true",
+ "sdk.codename O",
+ "sdk.preview.version 1",
+ "sdk.version 7.0",
+ "sdk.rel.id 1",
+ "sdk.preview 0",
+ ],
+ arg_files: [
+ "core/res/AndroidManifest.xml",
+ ":api-version-xml",
+ "core/java/overview.html",
+ ":current-support-api",
+ "api/current.txt",
+ ],
+ create_stubs: false,
+}
+
+droiddoc {
+ name: "doc-comment-check-docs",
+ defaults: ["framework-docs-default"],
+ args: framework_docs_args + " -referenceonly -parsecomments",
+ installable: false,
+}
+
+droiddoc {
+ name: "offline-sdk-docs",
+ defaults: ["framework-docs-default"],
+ hdf: [
+ "android.whichdoc offline",
+ ],
+ proofread_file: "offline-sdk-docs-proofrerad.txt",
+ args: framework_docs_args + " -offlinemode -title \"Android SDK\"",
+ write_sdk_values: true,
+ static_doc_index_redirect: "docs/docs-preview-index.html",
+}
+
+droiddoc {
+ name: "offline-sdk-referenceonly-docs",
+ defaults: ["framework-docs-default"],
+ hdf: [
+ "android.whichdoc offline",
+ ],
+ proofread_file: "offline-sdk-referenceonly-docs-proofrerad.txt",
+ args: framework_docs_args + " -offlinemode -title \"Android SDK\" -referenceonly",
+ write_sdk_values: true,
+ static_doc_index_redirect: "docs/docs-documentation-redirect.html",
+ static_doc_properties: "docs/source.properties",
+}
+
+droiddoc {
+ name: "offline-system-sdk-referenceonly-docs",
+ defaults: ["framework-docs-default"],
+ hdf: [
+ "android.whichdoc offline",
+ ],
+ proofread_file: "offline-system-sdk-referenceonly-docs-proofrerad.txt",
+ args: framework_docs_args + " -hide 101 -hide 104 -hide 108" +
+ " -showAnnotation android.annotation.SystemApi " +
+ " -offlinemode -title \"Android System SDK\" -referenceonly",
+ write_sdk_values: true,
+ static_doc_index_redirect: "docs/docs-documentation-redirect.html",
+ static_doc_properties: "docs/source.properties",
+}
+
+droiddoc {
+ name: "online-sdk-docs",
+ defaults: ["framework-docs-default"],
+ hdf: [
+ "android.whichdoc online",
+ "android.hasSamples true",
+ ],
+ proofread_file: "online-sdk-docs-proofrerad.txt",
+ args: framework_docs_args +
+ " -toroot / -samplegroup Admin " +
+ " -samplegroup Background " +
+ " -samplegroup Connectivity " +
+ " -samplegroup Content " +
+ " -samplegroup Input " +
+ " -samplegroup Media " +
+ " -samplegroup Notification " +
+ " -samplegroup RenderScript " +
+ " -samplegroup Security " +
+ " -samplegroup Sensors " +
+ " -samplegroup System " +
+ " -samplegroup Testing " +
+ " -samplegroup UI " +
+ " -samplegroup Views " +
+ " -samplegroup Wearable -samplesdir development/samples/browseable ",
+}
+
+droiddoc {
+ name: "online-system-api-sdk-docs",
+ defaults: ["framework-docs-default"],
+ hdf: [
+ "android.whichdoc online",
+ "android.hasSamples true",
+ ],
+ proofread_file: "online-system-api-sdk-docs-proofrerad.txt",
+ args: framework_docs_args +
+ " -referenceonly " +
+ " -showAnnotation android.annotation.SystemApi " +
+ " -title \"Android SDK - Including system APIs.\" " +
+ " -hide 101 " +
+ " -hide 104 " +
+ " -hide 108 " +
+ " -toroot / -samplegroup Admin " +
+ " -samplegroup Background " +
+ " -samplegroup Connectivity " +
+ " -samplegroup Content " +
+ " -samplegroup Input " +
+ " -samplegroup Media " +
+ " -samplegroup Notification " +
+ " -samplegroup RenderScript " +
+ " -samplegroup Security " +
+ " -samplegroup Sensors " +
+ " -samplegroup System " +
+ " -samplegroup Testing " +
+ " -samplegroup UI " +
+ " -samplegroup Views " +
+ " -samplegroup Wearable -samplesdir development/samples/browseable ",
+ installable: false,
+}
+
+droiddoc {
+ name: "ds-docs",
+ defaults: ["framework-docs-default"],
+ hdf: [
+ "android.whichdoc online",
+ "android.hasSamples true",
+ ],
+ proofread_file: "ds-docs-proofrerad.txt",
+ args: framework_docs_args +
+ " -toroot / -samplegroup Admin " +
+ " -samplegroup Background " +
+ " -samplegroup Connectivity " +
+ " -samplegroup Content " +
+ " -samplegroup Input " +
+ " -samplegroup Media " +
+ " -samplegroup Notification " +
+ " -samplegroup RenderScript " +
+ " -samplegroup Security " +
+ " -samplegroup Sensors " +
+ " -samplegroup System " +
+ " -samplegroup Testing " +
+ " -samplegroup UI " +
+ " -samplegroup Views " +
+ " -samplegroup Wearable -devsite -samplesdir development/samples/browseable ",
+}
+
+droiddoc {
+ name: "ds-static-docs",
+ defaults: ["framework-docs-default"],
+ hdf: [
+ "android.whichdoc online",
+ ],
+ proofread_file: "ds-static-docs-proofrerad.txt",
+ args: framework_docs_args +
+ " -staticonly " +
+ " -toroot / " +
+ " -devsite " +
+ " -ignoreJdLinks ",
+}
+
+droiddoc {
+ name: "ds-ref-navtree-docs",
+ defaults: ["framework-docs-default"],
+ hdf: [
+ "android.whichdoc online",
+ ],
+ proofread_file: "ds-ref-navtree-docs-proofrerad.txt",
+ args: framework_docs_args +
+ " -toroot / " +
+ " -atLinksNavtree " +
+ " -navtreeonly ",
+}
+
+droiddoc {
+ name: "online-sdk-dev-docs",
+ defaults: ["framework-docs-default"],
+ hdf: [
+ "android.whichdoc online",
+ "android.hasSamples true",
+ ],
+ proofread_file: "online-sdk-dev-docs-proofrerad.txt",
+ args: framework_docs_args +
+ " -toroot / -samplegroup Admin " +
+ " -samplegroup Background " +
+ " -samplegroup Connectivity " +
+ " -samplegroup Content " +
+ " -samplegroup Input " +
+ " -samplegroup Media " +
+ " -samplegroup Notification " +
+ " -samplegroup RenderScript " +
+ " -samplegroup Security " +
+ " -samplegroup Sensors " +
+ " -samplegroup System " +
+ " -samplegroup Testing " +
+ " -samplegroup UI " +
+ " -samplegroup Views " +
+ " -samplegroup Wearable -samplesdir development/samples/browseable ",
+}
+
+droiddoc {
+ name: "hidden-docs",
+ defaults: ["framework-docs-default"],
+ proofread_file: "hidden-docs-proofrerad.txt",
+ args: framework_docs_args +
+ " -referenceonly " +
+ " -title \"Android SDK - Including hidden APIs.\"",
+}
+
droiddoc {
name: "hwbinder-stubs-docs",
srcs: [
@@ -1178,12 +1459,13 @@
droiddoc {
name: "hiddenapi-lists",
- defaults: ["framework-docs-default"],
+ defaults: ["api-stubs-default"],
arg_files: [
"core/res/AndroidManifest.xml",
":api-version-xml",
"core/java/overview.html",
":current-support-api",
+ "api/current.txt",
],
dex_api_filename: "public-dex.txt",
private_dex_api_filename: "private-dex.txt",
@@ -1198,12 +1480,13 @@
droiddoc {
name: "hiddenapi-mappings",
- defaults: ["framework-docs-default"],
+ defaults: ["api-stubs-default"],
arg_files: [
"core/res/AndroidManifest.xml",
":api-version-xml",
"core/java/overview.html",
":current-support-api",
+ "api/current.txt",
],
dex_mapping_filename: "dex-mapping.txt",
args: framework_docs_args +
@@ -1247,7 +1530,7 @@
"--hide SdkConstant --hide HiddenTypeParameter --hide Todo --hide Typo"
doc_defaults {
- name: "metalava-framework-docs-default",
+ name: "metalava-api-stubs-default",
srcs: [
":opt-telephony-srcs",
":opt-net-voip-srcs",
@@ -1283,7 +1566,7 @@
droiddoc {
name: "metalava-api-stubs-docs",
- defaults: ["metalava-framework-docs-default"],
+ defaults: ["metalava-api-stubs-default"],
api_tag_name: "METALAVA_PUBLIC",
api_filename: "public_api.txt",
private_api_filename: "private.txt",
@@ -1296,7 +1579,7 @@
droiddoc {
name: "metalava-system-api-stubs-docs",
- defaults: ["metalava-framework-docs-default"],
+ defaults: ["metalava-api-stubs-default"],
api_tag_name: "METALAVA_SYSTEM",
api_filename: "system-api.txt",
private_api_filename: "system-private.txt",
@@ -1310,7 +1593,7 @@
droiddoc {
name: "metalava-test-api-stubs-docs",
- defaults: ["metalava-framework-docs-default"],
+ defaults: ["metalava-api-stubs-default"],
api_tag_name: "METALAVA_TEST",
api_filename: "test-api.txt",
removed_api_filename: "test-removed.txt",