Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 1 | // Copyright (C) 2019 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | // How API docs are generated: |
| 16 | // |
| 17 | // raw source files --(metalava)--> stub source files --(doclava)--> API doc |
| 18 | // |
| 19 | // The metalava conversion is done by droidstub modules framework-doc-*-stubs. |
| 20 | // The API doc generation is done by the various droiddoc modules each of which |
| 21 | // is for different format. |
| 22 | |
| 23 | ///////////////////////////////////////////////////////////////////// |
| 24 | // stub source files are generated using metalava |
| 25 | ///////////////////////////////////////////////////////////////////// |
| 26 | |
| 27 | framework_docs_only_libs = [ |
| 28 | "voip-common", |
| 29 | "android.test.mock", |
| 30 | "android-support-annotations", |
| 31 | "android-support-compat", |
| 32 | "android-support-core-ui", |
| 33 | "android-support-core-utils", |
| 34 | "android-support-design", |
| 35 | "android-support-dynamic-animation", |
| 36 | "android-support-exifinterface", |
| 37 | "android-support-fragment", |
| 38 | "android-support-media-compat", |
| 39 | "android-support-percent", |
| 40 | "android-support-transition", |
| 41 | "android-support-v7-cardview", |
| 42 | "android-support-v7-gridlayout", |
| 43 | "android-support-v7-mediarouter", |
| 44 | "android-support-v7-palette", |
| 45 | "android-support-v7-preference", |
| 46 | "android-support-v13", |
| 47 | "android-support-v14-preference", |
| 48 | "android-support-v17-leanback", |
| 49 | "android-support-vectordrawable", |
| 50 | "android-support-animatedvectordrawable", |
| 51 | "android-support-v7-appcompat", |
| 52 | "android-support-v7-recyclerview", |
| 53 | "android-support-v8-renderscript", |
| 54 | "android-support-multidex", |
| 55 | "android-support-multidex-instrumentation", |
| 56 | ] |
| 57 | |
| 58 | stubs_defaults { |
Anton Hansson | 867f94c | 2021-05-05 10:32:31 +0100 | [diff] [blame] | 59 | name: "android-non-updatable-doc-stubs-defaults", |
| 60 | defaults: ["android-non-updatable-stubs-defaults"], |
| 61 | srcs: [ |
| 62 | // No longer part of the stubs, but are included in the docs. |
Anton Hansson | 7854980 | 2022-01-17 18:14:55 +0000 | [diff] [blame] | 63 | ":android-test-base-sources", |
| 64 | ":android-test-mock-sources", |
| 65 | ":android-test-runner-sources", |
Anton Hansson | 867f94c | 2021-05-05 10:32:31 +0100 | [diff] [blame] | 66 | ], |
| 67 | libs: framework_docs_only_libs, |
| 68 | create_doc_stubs: true, |
| 69 | write_sdk_values: true, |
| 70 | } |
| 71 | |
| 72 | stubs_defaults { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 73 | name: "framework-doc-stubs-default", |
| 74 | srcs: [ |
Anton Hansson | 867f94c | 2021-05-05 10:32:31 +0100 | [diff] [blame] | 75 | ":android-non-updatable-stub-sources", |
Anton Hansson | 35c0b09 | 2021-03-30 10:46:48 +0100 | [diff] [blame] | 76 | |
Anton Hansson | 35c0b09 | 2021-03-30 10:46:48 +0100 | [diff] [blame] | 77 | // No longer part of the stubs, but are included in the docs. |
Anton Hansson | 2e25fdc | 2021-05-10 12:40:05 +0100 | [diff] [blame] | 78 | ":android-test-base-sources", |
| 79 | ":android-test-mock-sources", |
| 80 | ":android-test-runner-sources", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 81 | ], |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 82 | arg_files: [ |
| 83 | "core/res/AndroidManifest.xml", |
| 84 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 85 | libs: framework_docs_only_libs, |
| 86 | create_doc_stubs: true, |
| 87 | annotations_enabled: true, |
Anton Hansson | 76ac4cc | 2021-05-05 19:22:52 +0100 | [diff] [blame] | 88 | filter_packages: packages_to_document, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 89 | api_levels_annotations_enabled: true, |
| 90 | api_levels_annotations_dirs: [ |
| 91 | "sdk-dir", |
| 92 | "api-versions-jars-dir", |
| 93 | ], |
Anton Hansson | f68ddea | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 94 | previous_api: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 95 | merge_annotations_dirs: [ |
| 96 | "metalava-manual", |
| 97 | ], |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 98 | write_sdk_values: true, |
Ytai Ben-Tsvi | da7c21e | 2020-09-16 13:04:31 -0700 | [diff] [blame] | 99 | // TODO(b/169090544): remove below aidl includes. |
| 100 | aidl: { |
| 101 | local_include_dirs: ["media/aidl"], |
Jeff Sharkey | 75d4f93 | 2021-07-26 15:41:01 -0600 | [diff] [blame] | 102 | include_dirs: [ |
| 103 | "frameworks/av/aidl", |
| 104 | "frameworks/native/libs/permission/aidl", |
| 105 | ], |
Ytai Ben-Tsvi | da7c21e | 2020-09-16 13:04:31 -0700 | [diff] [blame] | 106 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 107 | } |
| 108 | |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 109 | // Defaults module for doc-stubs targets that use module source code as input. |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 110 | stubs_defaults { |
| 111 | name: "framework-doc-stubs-sources-default", |
| 112 | defaults: ["framework-doc-stubs-default"], |
| 113 | srcs: [ |
Anton Hansson | ecf9fc3 | 2022-01-14 12:10:01 +0000 | [diff] [blame] | 114 | ":art.module.public.api{.public.stubs.source}", |
| 115 | ":conscrypt.module.public.api{.public.stubs.source}", |
| 116 | ":i18n.module.public.api{.public.stubs.source}", |
| 117 | |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 118 | ":framework-appsearch-sources", |
| 119 | ":framework-connectivity-sources", |
paulhu | f45fe96 | 2021-12-14 23:09:55 +0800 | [diff] [blame] | 120 | ":framework-connectivity-tiramisu-updatable-sources", |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 121 | ":framework-graphics-srcs", |
| 122 | ":framework-mediaprovider-sources", |
Chun Zhang | a615ce5 | 2021-10-29 14:57:55 -0700 | [diff] [blame] | 123 | ":framework-nearby-sources", |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 124 | ":framework-permission-sources", |
| 125 | ":framework-permission-s-sources", |
| 126 | ":framework-scheduling-sources", |
| 127 | ":framework-sdkextensions-sources", |
| 128 | ":framework-statsd-sources", |
Gavin Corkery | bc00644 | 2021-11-16 22:33:10 +0000 | [diff] [blame] | 129 | ":framework-supplementalprocess-sources", |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 130 | ":framework-tethering-srcs", |
Roshan Pius | de6f1ca | 2021-10-14 07:34:07 -0700 | [diff] [blame] | 131 | ":framework-uwb-updatable-sources", |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 132 | ":framework-wifi-updatable-sources", |
| 133 | ":ike-srcs", |
| 134 | ":updatable-media-srcs", |
| 135 | ], |
| 136 | } |
| 137 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 138 | droidstubs { |
Anton Hansson | 867f94c | 2021-05-05 10:32:31 +0100 | [diff] [blame] | 139 | name: "android-non-updatable-doc-stubs", |
| 140 | defaults: ["android-non-updatable-doc-stubs-defaults"], |
| 141 | args: metalava_framework_docs_args, |
| 142 | } |
| 143 | |
| 144 | droidstubs { |
| 145 | name: "android-non-updatable-doc-stubs-system", |
| 146 | defaults: ["android-non-updatable-doc-stubs-defaults"], |
| 147 | args: metalava_framework_docs_args + |
| 148 | " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS\\) ", |
| 149 | } |
| 150 | |
| 151 | droidstubs { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 152 | name: "framework-doc-system-stubs", |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 153 | defaults: ["framework-doc-stubs-sources-default"], |
Anton Hansson | 121ccbc | 2020-12-17 14:56:06 +0000 | [diff] [blame] | 154 | args: metalava_framework_docs_args + |
Anton Hansson | 121ccbc | 2020-12-17 14:56:06 +0000 | [diff] [blame] | 155 | " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS\\) ", |
satayev | bc7c83e | 2021-06-29 22:27:06 +0100 | [diff] [blame] | 156 | api_levels_sdk_type: "system", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 157 | } |
| 158 | |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 159 | droidstubs { |
Anton Hansson | 111e158 | 2021-10-26 14:12:10 +0000 | [diff] [blame] | 160 | name: "framework-doc-stubs", |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 161 | defaults: ["framework-doc-stubs-default"], |
Anton Hansson | ecf9fc3 | 2022-01-14 12:10:01 +0000 | [diff] [blame] | 162 | srcs: [":all-modules-public-stubs-source"], |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 163 | args: metalava_framework_docs_args, |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 164 | aidl: { |
| 165 | local_include_dirs: [ |
| 166 | "apex/media/aidl/stable", |
| 167 | ], |
| 168 | include_dirs: [ |
| 169 | "packages/modules/Connectivity/framework/aidl-export", |
| 170 | ], |
| 171 | }, |
| 172 | } |
| 173 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 174 | ///////////////////////////////////////////////////////////////////// |
| 175 | // API docs are created from the generated stub source files |
| 176 | // using droiddoc |
| 177 | ///////////////////////////////////////////////////////////////////// |
| 178 | |
| 179 | framework_docs_only_args = " -android -manifest $(location core/res/AndroidManifest.xml) " + |
| 180 | "-werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " + |
| 181 | "-overview $(location core/java/overview.html) " + |
| 182 | // Federate Support Library references against local API file. |
| 183 | "-federate SupportLib https://developer.android.com " + |
| 184 | "-federationapi SupportLib $(location :current-support-api) " + |
| 185 | // Federate Support Library references against local API file. |
| 186 | "-federate AndroidX https://developer.android.com " + |
| 187 | "-federationapi AndroidX $(location :current-androidx-api) " |
| 188 | |
| 189 | doc_defaults { |
| 190 | name: "framework-docs-default", |
Artur Satayev | ffd7f95 | 2020-01-13 16:16:27 +0000 | [diff] [blame] | 191 | libs: framework_docs_only_libs + [ |
| 192 | "stub-annotations", |
| 193 | "unsupportedappusage", |
| 194 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 195 | html_dirs: [ |
| 196 | "docs/html", |
| 197 | ], |
| 198 | knowntags: [ |
| 199 | "docs/knowntags.txt", |
Paul Duffin | 8c083f6 | 2020-09-08 20:22:49 +0100 | [diff] [blame] | 200 | ":art.module.public.api{.doctags}", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 201 | ], |
| 202 | custom_template: "droiddoc-templates-sdk", |
| 203 | resourcesdir: "docs/html/reference/images/", |
| 204 | resourcesoutdir: "reference/android/images/", |
| 205 | hdf: [ |
| 206 | "dac true", |
| 207 | "sdk.codename O", |
| 208 | "sdk.preview.version 1", |
| 209 | "sdk.version 7.0", |
| 210 | "sdk.rel.id 1", |
| 211 | "sdk.preview 0", |
| 212 | ], |
| 213 | arg_files: [ |
| 214 | "core/res/AndroidManifest.xml", |
| 215 | "core/java/overview.html", |
| 216 | ":current-support-api", |
| 217 | ":current-androidx-api", |
| 218 | ], |
Ytai Ben-Tsvi | da7c21e | 2020-09-16 13:04:31 -0700 | [diff] [blame] | 219 | // TODO(b/169090544): remove below aidl includes. |
| 220 | aidl: { |
| 221 | local_include_dirs: ["media/aidl"], |
Jeff Sharkey | 75d4f93 | 2021-07-26 15:41:01 -0600 | [diff] [blame] | 222 | include_dirs: [ |
| 223 | "frameworks/av/aidl", |
| 224 | "frameworks/native/libs/permission/aidl", |
| 225 | ], |
Ytai Ben-Tsvi | da7c21e | 2020-09-16 13:04:31 -0700 | [diff] [blame] | 226 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 227 | } |
| 228 | |
| 229 | doc_defaults { |
| 230 | name: "framework-dokka-docs-default", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 231 | } |
| 232 | |
| 233 | droiddoc { |
| 234 | name: "doc-comment-check-docs", |
| 235 | defaults: ["framework-docs-default"], |
| 236 | srcs: [ |
| 237 | ":framework-doc-stubs", |
| 238 | ], |
| 239 | args: framework_docs_only_args + " -referenceonly -parsecomments", |
| 240 | installable: false, |
| 241 | } |
| 242 | |
| 243 | droiddoc { |
| 244 | name: "offline-sdk-docs", |
| 245 | defaults: ["framework-docs-default"], |
| 246 | srcs: [ |
| 247 | ":framework-doc-stubs", |
| 248 | ], |
| 249 | hdf: [ |
| 250 | "android.whichdoc offline", |
| 251 | ], |
atrost | b1ee27b | 2020-02-03 11:03:16 +0000 | [diff] [blame] | 252 | compat_config: ":global-compat-config", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 253 | proofread_file: "offline-sdk-docs-proofrerad.txt", |
| 254 | args: framework_docs_only_args + " -offlinemode -title \"Android SDK\"", |
| 255 | static_doc_index_redirect: "docs/docs-preview-index.html", |
| 256 | } |
| 257 | |
| 258 | droiddoc { |
| 259 | // Please sync with android-api-council@ before making any changes for the name property below. |
| 260 | // Since there's cron jobs that fetch offline-sdk-referenceonly-docs-docs.zip periodically. |
| 261 | // See b/116221385 for reference. |
| 262 | name: "offline-sdk-referenceonly-docs", |
| 263 | defaults: ["framework-docs-default"], |
| 264 | srcs: [ |
| 265 | ":framework-doc-stubs", |
| 266 | ], |
| 267 | hdf: [ |
| 268 | "android.whichdoc offline", |
| 269 | ], |
| 270 | proofread_file: "offline-sdk-referenceonly-docs-proofrerad.txt", |
| 271 | args: framework_docs_only_args + " -offlinemode -title \"Android SDK\" -referenceonly", |
| 272 | static_doc_index_redirect: "docs/docs-documentation-redirect.html", |
| 273 | static_doc_properties: "docs/source.properties", |
| 274 | } |
| 275 | |
| 276 | droiddoc { |
| 277 | // Please sync with android-api-council@ before making any changes for the name property below. |
| 278 | // Since there's cron jobs that fetch offline-system-sdk-referenceonly-docs-docs.zip periodically. |
| 279 | // See b/116221385 for reference. |
| 280 | name: "offline-system-sdk-referenceonly-docs", |
| 281 | defaults: ["framework-docs-default"], |
| 282 | srcs: [ |
| 283 | ":framework-doc-system-stubs", |
| 284 | ], |
| 285 | hdf: [ |
| 286 | "android.whichdoc offline", |
| 287 | ], |
| 288 | proofread_file: "offline-system-sdk-referenceonly-docs-proofrerad.txt", |
| 289 | args: framework_docs_only_args + " -hide 101 -hide 104 -hide 108" + |
| 290 | " -offlinemode -title \"Android System SDK\" -referenceonly", |
| 291 | static_doc_index_redirect: "docs/docs-documentation-redirect.html", |
| 292 | static_doc_properties: "docs/source.properties", |
| 293 | } |
| 294 | |
| 295 | droiddoc { |
| 296 | name: "online-sdk-docs", |
| 297 | defaults: ["framework-docs-default"], |
| 298 | srcs: [ |
| 299 | ":framework-doc-stubs", |
| 300 | ], |
| 301 | hdf: [ |
| 302 | "android.whichdoc online", |
| 303 | "android.hasSamples true", |
| 304 | ], |
| 305 | proofread_file: "online-sdk-docs-proofrerad.txt", |
| 306 | args: framework_docs_only_args + |
| 307 | " -toroot / -samplegroup Admin " + |
| 308 | " -samplegroup Background " + |
| 309 | " -samplegroup Connectivity " + |
| 310 | " -samplegroup Content " + |
| 311 | " -samplegroup Input " + |
| 312 | " -samplegroup Media " + |
| 313 | " -samplegroup Notification " + |
| 314 | " -samplegroup RenderScript " + |
| 315 | " -samplegroup Security " + |
| 316 | " -samplegroup Sensors " + |
| 317 | " -samplegroup System " + |
| 318 | " -samplegroup Testing " + |
| 319 | " -samplegroup UI " + |
| 320 | " -samplegroup Views " + |
| 321 | " -samplegroup Wearable -samplesdir development/samples/browseable ", |
| 322 | } |
| 323 | |
| 324 | droiddoc { |
| 325 | name: "online-system-api-sdk-docs", |
| 326 | defaults: ["framework-docs-default"], |
| 327 | srcs: [ |
| 328 | ":framework-doc-system-stubs", |
| 329 | ], |
| 330 | hdf: [ |
| 331 | "android.whichdoc online", |
| 332 | "android.hasSamples true", |
| 333 | ], |
| 334 | proofread_file: "online-system-api-sdk-docs-proofrerad.txt", |
| 335 | args: framework_docs_only_args + |
| 336 | " -referenceonly " + |
| 337 | " -title \"Android SDK - Including system APIs.\" " + |
| 338 | " -hide 101 " + |
| 339 | " -hide 104 " + |
| 340 | " -hide 108 " + |
| 341 | " -toroot / -samplegroup Admin " + |
| 342 | " -samplegroup Background " + |
| 343 | " -samplegroup Connectivity " + |
| 344 | " -samplegroup Content " + |
| 345 | " -samplegroup Input " + |
| 346 | " -samplegroup Media " + |
| 347 | " -samplegroup Notification " + |
| 348 | " -samplegroup RenderScript " + |
| 349 | " -samplegroup Security " + |
| 350 | " -samplegroup Sensors " + |
| 351 | " -samplegroup System " + |
| 352 | " -samplegroup Testing " + |
| 353 | " -samplegroup UI " + |
| 354 | " -samplegroup Views " + |
| 355 | " -samplegroup Wearable -samplesdir development/samples/browseable ", |
| 356 | installable: false, |
| 357 | } |
| 358 | |
| 359 | droiddoc { |
| 360 | name: "ds-docs-java", |
| 361 | defaults: ["framework-docs-default"], |
| 362 | srcs: [ |
| 363 | ":framework-doc-stubs", |
| 364 | ], |
| 365 | hdf: [ |
| 366 | "android.whichdoc online", |
| 367 | "android.hasSamples true", |
| 368 | ], |
| 369 | proofread_file: "ds-docs-proofrerad.txt", |
| 370 | args: framework_docs_only_args + |
| 371 | " -toroot / -yamlV2 -metalavaApiSince -samplegroup Admin " + |
| 372 | " -samplegroup Background " + |
| 373 | " -samplegroup Connectivity " + |
| 374 | " -samplegroup Content " + |
| 375 | " -samplegroup Input " + |
| 376 | " -samplegroup Media " + |
| 377 | " -samplegroup Notification " + |
| 378 | " -samplegroup RenderScript " + |
| 379 | " -samplegroup Security " + |
| 380 | " -samplegroup Sensors " + |
| 381 | " -samplegroup System " + |
| 382 | " -samplegroup Testing " + |
| 383 | " -samplegroup UI " + |
| 384 | " -samplegroup Views " + |
| 385 | " -samplegroup Wearable -devsite -samplesdir development/samples/browseable ", |
| 386 | } |
| 387 | |
| 388 | droiddoc { |
| 389 | name: "ds-docs-kt", |
| 390 | defaults: ["framework-dokka-docs-default"], |
| 391 | srcs: [ |
| 392 | ":framework-doc-stubs", |
| 393 | ], |
| 394 | args: "-noJdkLink -links https://kotlinlang.org/api/latest/jvm/stdlib/^external/dokka/package-list " + |
Dan Willemsen | cece97c | 2020-04-20 22:32:45 -0700 | [diff] [blame] | 395 | "-noStdlibLink", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 396 | proofread_file: "ds-dokka-proofread.txt", |
| 397 | dokka_enabled: true, |
| 398 | } |
| 399 | |
| 400 | java_genrule { |
| 401 | name: "ds-docs", |
| 402 | tools: [ |
| 403 | "zip2zip", |
| 404 | "merge_zips", |
| 405 | ], |
| 406 | srcs: [ |
| 407 | ":ds-docs-java{.docs.zip}", |
| 408 | ":ds-docs-kt{.docs.zip}", |
| 409 | ], |
| 410 | out: ["ds-docs.zip"], |
| 411 | dist: { |
| 412 | targets: ["docs"], |
| 413 | }, |
| 414 | cmd: "$(location zip2zip) -i $(location :ds-docs-kt{.docs.zip}) -o $(genDir)/ds-docs-kt-moved.zip **/*:en/reference/kotlin && " + |
Dan Willemsen | cece97c | 2020-04-20 22:32:45 -0700 | [diff] [blame] | 415 | "$(location merge_zips) $(out) $(location :ds-docs-java{.docs.zip}) $(genDir)/ds-docs-kt-moved.zip", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 416 | } |
| 417 | |
| 418 | java_genrule { |
| 419 | name: "ds-docs-switched", |
| 420 | tools: [ |
| 421 | "switcher4", |
| 422 | "soong_zip", |
| 423 | ], |
| 424 | srcs: [ |
| 425 | ":ds-docs-java{.docs.zip}", |
| 426 | ":ds-docs-kt{.docs.zip}", |
| 427 | ], |
| 428 | out: ["ds-docs-switched.zip"], |
| 429 | dist: { |
| 430 | targets: ["docs"], |
| 431 | }, |
Colin Cross | a2410eb | 2020-02-26 13:04:57 -0800 | [diff] [blame] | 432 | cmd: "unzip -q $(location :ds-docs-java{.docs.zip}) -d $(genDir) && " + |
Dan Willemsen | cece97c | 2020-04-20 22:32:45 -0700 | [diff] [blame] | 433 | "unzip -q $(location :ds-docs-kt{.docs.zip}) -d $(genDir)/en/reference/kotlin && " + |
| 434 | "SWITCHER=$$(cd $$(dirname $(location switcher4)) && pwd)/$$(basename $(location switcher4)) && " + |
| 435 | "(cd $(genDir)/en/reference && $$SWITCHER --work platform) > /dev/null && " + |
| 436 | "$(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 437 | } |
| 438 | |
| 439 | droiddoc { |
| 440 | name: "ds-static-docs", |
| 441 | defaults: ["framework-docs-default"], |
| 442 | srcs: [ |
| 443 | ":framework-doc-stubs", |
| 444 | ], |
| 445 | hdf: [ |
| 446 | "android.whichdoc online", |
| 447 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 448 | args: framework_docs_only_args + |
| 449 | " -staticonly " + |
| 450 | " -toroot / " + |
| 451 | " -devsite " + |
| 452 | " -ignoreJdLinks ", |
| 453 | } |
| 454 | |
| 455 | droiddoc { |
| 456 | name: "ds-ref-navtree-docs", |
| 457 | defaults: ["framework-docs-default"], |
| 458 | srcs: [ |
| 459 | ":framework-doc-stubs", |
| 460 | ], |
| 461 | hdf: [ |
| 462 | "android.whichdoc online", |
| 463 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 464 | args: framework_docs_only_args + |
| 465 | " -toroot / " + |
| 466 | " -atLinksNavtree " + |
| 467 | " -navtreeonly ", |
| 468 | } |
| 469 | |
| 470 | droiddoc { |
| 471 | name: "online-sdk-dev-docs", |
| 472 | defaults: ["framework-docs-default"], |
| 473 | srcs: [ |
| 474 | ":framework-doc-stubs", |
| 475 | ], |
| 476 | hdf: [ |
| 477 | "android.whichdoc online", |
| 478 | "android.hasSamples true", |
| 479 | ], |
| 480 | proofread_file: "online-sdk-dev-docs-proofrerad.txt", |
| 481 | args: framework_docs_only_args + |
| 482 | " -toroot / -samplegroup Admin " + |
| 483 | " -samplegroup Background " + |
| 484 | " -samplegroup Connectivity " + |
| 485 | " -samplegroup Content " + |
| 486 | " -samplegroup Input " + |
| 487 | " -samplegroup Media " + |
| 488 | " -samplegroup Notification " + |
| 489 | " -samplegroup RenderScript " + |
| 490 | " -samplegroup Security " + |
| 491 | " -samplegroup Sensors " + |
| 492 | " -samplegroup System " + |
| 493 | " -samplegroup Testing " + |
| 494 | " -samplegroup UI " + |
| 495 | " -samplegroup Views " + |
| 496 | " -samplegroup Wearable -samplesdir development/samples/browseable ", |
| 497 | } |
| 498 | |
| 499 | droiddoc { |
| 500 | name: "hidden-docs", |
| 501 | defaults: ["framework-docs-default"], |
| 502 | srcs: [ |
| 503 | ":framework-doc-stubs", |
| 504 | ], |
| 505 | proofread_file: "hidden-docs-proofrerad.txt", |
| 506 | args: framework_docs_only_args + |
| 507 | " -referenceonly " + |
| 508 | " -title \"Android SDK - Including hidden APIs.\"", |
| 509 | } |