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. |
| 63 | "test-base/src/**/*.java", |
| 64 | "test-mock/src/**/*.java", |
| 65 | "test-runner/src/**/*.java", |
| 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 | |
| 77 | // Module sources |
Paul Duffin | 404b26a | 2020-09-16 14:26:47 +0100 | [diff] [blame] | 78 | ":art.module.public.api{.public.stubs.source}", |
Paul Duffin | e55d4e3 | 2020-05-14 17:55:46 +0100 | [diff] [blame] | 79 | ":conscrypt.module.public.api{.public.stubs.source}", |
Paul Duffin | 5a4e8f2 | 2020-11-25 15:45:43 +0000 | [diff] [blame] | 80 | ":i18n.module.public.api{.public.stubs.source}", |
Anton Hansson | 35c0b09 | 2021-03-30 10:46:48 +0100 | [diff] [blame] | 81 | |
| 82 | // No longer part of the stubs, but are included in the docs. |
Anton Hansson | 2e25fdc | 2021-05-10 12:40:05 +0100 | [diff] [blame] | 83 | ":android-test-base-sources", |
| 84 | ":android-test-mock-sources", |
| 85 | ":android-test-runner-sources", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 86 | ], |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 87 | arg_files: [ |
| 88 | "core/res/AndroidManifest.xml", |
| 89 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 90 | libs: framework_docs_only_libs, |
| 91 | create_doc_stubs: true, |
| 92 | annotations_enabled: true, |
Anton Hansson | 76ac4cc | 2021-05-05 19:22:52 +0100 | [diff] [blame] | 93 | filter_packages: packages_to_document, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 94 | api_levels_annotations_enabled: true, |
| 95 | api_levels_annotations_dirs: [ |
| 96 | "sdk-dir", |
| 97 | "api-versions-jars-dir", |
| 98 | ], |
Anton Hansson | f68ddea | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 99 | previous_api: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 100 | merge_annotations_dirs: [ |
| 101 | "metalava-manual", |
| 102 | ], |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 103 | write_sdk_values: true, |
Ytai Ben-Tsvi | da7c21e | 2020-09-16 13:04:31 -0700 | [diff] [blame] | 104 | // TODO(b/169090544): remove below aidl includes. |
| 105 | aidl: { |
| 106 | local_include_dirs: ["media/aidl"], |
Jeff Sharkey | 75d4f93 | 2021-07-26 15:41:01 -0600 | [diff] [blame] | 107 | include_dirs: [ |
| 108 | "frameworks/av/aidl", |
| 109 | "frameworks/native/libs/permission/aidl", |
| 110 | ], |
Ytai Ben-Tsvi | da7c21e | 2020-09-16 13:04:31 -0700 | [diff] [blame] | 111 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 112 | } |
| 113 | |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 114 | // Defaults module for doc-stubs targets that use module source code as input. |
| 115 | // This is the default/normal. |
| 116 | stubs_defaults { |
| 117 | name: "framework-doc-stubs-sources-default", |
| 118 | defaults: ["framework-doc-stubs-default"], |
| 119 | srcs: [ |
| 120 | ":framework-appsearch-sources", |
| 121 | ":framework-connectivity-sources", |
| 122 | ":framework-graphics-srcs", |
| 123 | ":framework-mediaprovider-sources", |
| 124 | ":framework-permission-sources", |
| 125 | ":framework-permission-s-sources", |
| 126 | ":framework-scheduling-sources", |
| 127 | ":framework-sdkextensions-sources", |
| 128 | ":framework-statsd-sources", |
| 129 | ":framework-tethering-srcs", |
Roshan Pius | de6f1ca | 2021-10-14 07:34:07 -0700 | [diff] [blame^] | 130 | ":framework-uwb-updatable-sources", |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 131 | ":framework-wifi-updatable-sources", |
| 132 | ":ike-srcs", |
| 133 | ":updatable-media-srcs", |
| 134 | ], |
| 135 | } |
| 136 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 137 | droidstubs { |
Anton Hansson | 867f94c | 2021-05-05 10:32:31 +0100 | [diff] [blame] | 138 | name: "android-non-updatable-doc-stubs", |
| 139 | defaults: ["android-non-updatable-doc-stubs-defaults"], |
| 140 | args: metalava_framework_docs_args, |
| 141 | } |
| 142 | |
| 143 | droidstubs { |
| 144 | name: "android-non-updatable-doc-stubs-system", |
| 145 | defaults: ["android-non-updatable-doc-stubs-defaults"], |
| 146 | args: metalava_framework_docs_args + |
| 147 | " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS\\) ", |
| 148 | } |
| 149 | |
| 150 | droidstubs { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 151 | name: "framework-doc-stubs", |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 152 | defaults: ["framework-doc-stubs-sources-default"], |
Anton Hansson | 26c843f | 2021-05-05 11:11:57 +0100 | [diff] [blame] | 153 | args: metalava_framework_docs_args, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 154 | } |
| 155 | |
| 156 | droidstubs { |
| 157 | name: "framework-doc-system-stubs", |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 158 | defaults: ["framework-doc-stubs-sources-default"], |
Anton Hansson | 121ccbc | 2020-12-17 14:56:06 +0000 | [diff] [blame] | 159 | args: metalava_framework_docs_args + |
Anton Hansson | 121ccbc | 2020-12-17 14:56:06 +0000 | [diff] [blame] | 160 | " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS\\) ", |
satayev | bc7c83e | 2021-06-29 22:27:06 +0100 | [diff] [blame] | 161 | api_levels_sdk_type: "system", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 162 | } |
| 163 | |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 164 | // Experimental target building doc stubs with module stub source code as input. |
| 165 | // This is intended to eventually replace framework-doc-stubs, once all diffs |
| 166 | // have been eliminated. |
| 167 | droidstubs { |
| 168 | name: "framework-doc-stubs-module-stubs", |
| 169 | defaults: ["framework-doc-stubs-default"], |
| 170 | args: metalava_framework_docs_args, |
| 171 | srcs: [ |
| 172 | ":android.net.ipsec.ike{.public.stubs.source}", |
| 173 | ":framework-appsearch{.public.stubs.source}", |
| 174 | ":framework-connectivity{.public.stubs.source}", |
| 175 | ":framework-graphics{.public.stubs.source}", |
| 176 | ":framework-media{.public.stubs.source}", |
| 177 | ":framework-mediaprovider{.public.stubs.source}", |
| 178 | ":framework-permission{.public.stubs.source}", |
| 179 | ":framework-permission-s{.public.stubs.source}", |
| 180 | ":framework-scheduling{.public.stubs.source}", |
| 181 | ":framework-sdkextensions{.public.stubs.source}", |
| 182 | ":framework-statsd{.public.stubs.source}", |
| 183 | ":framework-tethering{.public.stubs.source}", |
Roshan Pius | de6f1ca | 2021-10-14 07:34:07 -0700 | [diff] [blame^] | 184 | ":framework-uwb{.public.stubs.source}", |
Anton Hansson | fa5d0bc | 2021-09-17 16:09:08 +0100 | [diff] [blame] | 185 | ":framework-wifi{.public.stubs.source}", |
| 186 | ], |
| 187 | aidl: { |
| 188 | local_include_dirs: [ |
| 189 | "apex/media/aidl/stable", |
| 190 | ], |
| 191 | include_dirs: [ |
| 192 | "packages/modules/Connectivity/framework/aidl-export", |
| 193 | ], |
| 194 | }, |
| 195 | } |
| 196 | |
Anton Hansson | 1bf568e | 2021-09-24 13:16:19 +0100 | [diff] [blame] | 197 | // This produces the same annotations.zip as framework-doc-stubs, but by using |
| 198 | // outputs from individual modules instead of all the source code. |
| 199 | genrule { |
| 200 | name: "sdk-annotations.zip", |
| 201 | srcs: [ |
| 202 | ":android-non-updatable-doc-stubs{.annotations.zip}", |
| 203 | |
| 204 | // Conscrypt and i18n currently do not enable annotations |
| 205 | // ":conscrypt.module.public.api{.public.annotations.zip}", |
| 206 | // ":i18n.module.public.api{.public.annotations.zip}", |
| 207 | |
| 208 | // Modules that enable annotations below |
| 209 | ":android.net.ipsec.ike{.public.annotations.zip}", |
| 210 | ":art.module.public.api{.public.annotations.zip}", |
| 211 | ":framework-appsearch{.public.annotations.zip}", |
| 212 | ":framework-connectivity{.public.annotations.zip}", |
| 213 | ":framework-graphics{.public.annotations.zip}", |
| 214 | ":framework-media{.public.annotations.zip}", |
| 215 | ":framework-mediaprovider{.public.annotations.zip}", |
| 216 | ":framework-permission{.public.annotations.zip}", |
| 217 | ":framework-permission-s{.public.annotations.zip}", |
| 218 | ":framework-scheduling{.public.annotations.zip}", |
| 219 | ":framework-sdkextensions{.public.annotations.zip}", |
| 220 | ":framework-statsd{.public.annotations.zip}", |
| 221 | ":framework-tethering{.public.annotations.zip}", |
Roshan Pius | de6f1ca | 2021-10-14 07:34:07 -0700 | [diff] [blame^] | 222 | ":framework-uwb{.public.annotations.zip}", |
Anton Hansson | 1bf568e | 2021-09-24 13:16:19 +0100 | [diff] [blame] | 223 | ":framework-wifi{.public.annotations.zip}", |
| 224 | ], |
| 225 | out: ["annotations.zip"], |
| 226 | tools: [ |
| 227 | "merge_annotation_zips", |
| 228 | "soong_zip", |
| 229 | ], |
| 230 | cmd: "$(location merge_annotation_zips) $(genDir)/out $(in) && " + |
| 231 | "$(location soong_zip) -o $(out) -C $(genDir)/out -D $(genDir)/out", |
| 232 | } |
| 233 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 234 | ///////////////////////////////////////////////////////////////////// |
| 235 | // API docs are created from the generated stub source files |
| 236 | // using droiddoc |
| 237 | ///////////////////////////////////////////////////////////////////// |
| 238 | |
| 239 | framework_docs_only_args = " -android -manifest $(location core/res/AndroidManifest.xml) " + |
| 240 | "-werror -lerror -hide 111 -hide 113 -hide 125 -hide 126 -hide 127 -hide 128 " + |
| 241 | "-overview $(location core/java/overview.html) " + |
| 242 | // Federate Support Library references against local API file. |
| 243 | "-federate SupportLib https://developer.android.com " + |
| 244 | "-federationapi SupportLib $(location :current-support-api) " + |
| 245 | // Federate Support Library references against local API file. |
| 246 | "-federate AndroidX https://developer.android.com " + |
| 247 | "-federationapi AndroidX $(location :current-androidx-api) " |
| 248 | |
| 249 | doc_defaults { |
| 250 | name: "framework-docs-default", |
Artur Satayev | ffd7f95 | 2020-01-13 16:16:27 +0000 | [diff] [blame] | 251 | libs: framework_docs_only_libs + [ |
| 252 | "stub-annotations", |
| 253 | "unsupportedappusage", |
| 254 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 255 | html_dirs: [ |
| 256 | "docs/html", |
| 257 | ], |
| 258 | knowntags: [ |
| 259 | "docs/knowntags.txt", |
Paul Duffin | 8c083f6 | 2020-09-08 20:22:49 +0100 | [diff] [blame] | 260 | ":art.module.public.api{.doctags}", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 261 | ], |
| 262 | custom_template: "droiddoc-templates-sdk", |
| 263 | resourcesdir: "docs/html/reference/images/", |
| 264 | resourcesoutdir: "reference/android/images/", |
| 265 | hdf: [ |
| 266 | "dac true", |
| 267 | "sdk.codename O", |
| 268 | "sdk.preview.version 1", |
| 269 | "sdk.version 7.0", |
| 270 | "sdk.rel.id 1", |
| 271 | "sdk.preview 0", |
| 272 | ], |
| 273 | arg_files: [ |
| 274 | "core/res/AndroidManifest.xml", |
| 275 | "core/java/overview.html", |
| 276 | ":current-support-api", |
| 277 | ":current-androidx-api", |
| 278 | ], |
Ytai Ben-Tsvi | da7c21e | 2020-09-16 13:04:31 -0700 | [diff] [blame] | 279 | // TODO(b/169090544): remove below aidl includes. |
| 280 | aidl: { |
| 281 | local_include_dirs: ["media/aidl"], |
Jeff Sharkey | 75d4f93 | 2021-07-26 15:41:01 -0600 | [diff] [blame] | 282 | include_dirs: [ |
| 283 | "frameworks/av/aidl", |
| 284 | "frameworks/native/libs/permission/aidl", |
| 285 | ], |
Ytai Ben-Tsvi | da7c21e | 2020-09-16 13:04:31 -0700 | [diff] [blame] | 286 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 287 | } |
| 288 | |
| 289 | doc_defaults { |
| 290 | name: "framework-dokka-docs-default", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 291 | } |
| 292 | |
| 293 | droiddoc { |
| 294 | name: "doc-comment-check-docs", |
| 295 | defaults: ["framework-docs-default"], |
| 296 | srcs: [ |
| 297 | ":framework-doc-stubs", |
| 298 | ], |
| 299 | args: framework_docs_only_args + " -referenceonly -parsecomments", |
| 300 | installable: false, |
| 301 | } |
| 302 | |
| 303 | droiddoc { |
| 304 | name: "offline-sdk-docs", |
| 305 | defaults: ["framework-docs-default"], |
| 306 | srcs: [ |
| 307 | ":framework-doc-stubs", |
| 308 | ], |
| 309 | hdf: [ |
| 310 | "android.whichdoc offline", |
| 311 | ], |
atrost | b1ee27b | 2020-02-03 11:03:16 +0000 | [diff] [blame] | 312 | compat_config: ":global-compat-config", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 313 | proofread_file: "offline-sdk-docs-proofrerad.txt", |
| 314 | args: framework_docs_only_args + " -offlinemode -title \"Android SDK\"", |
| 315 | static_doc_index_redirect: "docs/docs-preview-index.html", |
| 316 | } |
| 317 | |
| 318 | droiddoc { |
| 319 | // Please sync with android-api-council@ before making any changes for the name property below. |
| 320 | // Since there's cron jobs that fetch offline-sdk-referenceonly-docs-docs.zip periodically. |
| 321 | // See b/116221385 for reference. |
| 322 | name: "offline-sdk-referenceonly-docs", |
| 323 | defaults: ["framework-docs-default"], |
| 324 | srcs: [ |
| 325 | ":framework-doc-stubs", |
| 326 | ], |
| 327 | hdf: [ |
| 328 | "android.whichdoc offline", |
| 329 | ], |
| 330 | proofread_file: "offline-sdk-referenceonly-docs-proofrerad.txt", |
| 331 | args: framework_docs_only_args + " -offlinemode -title \"Android SDK\" -referenceonly", |
| 332 | static_doc_index_redirect: "docs/docs-documentation-redirect.html", |
| 333 | static_doc_properties: "docs/source.properties", |
| 334 | } |
| 335 | |
| 336 | droiddoc { |
| 337 | // Please sync with android-api-council@ before making any changes for the name property below. |
| 338 | // Since there's cron jobs that fetch offline-system-sdk-referenceonly-docs-docs.zip periodically. |
| 339 | // See b/116221385 for reference. |
| 340 | name: "offline-system-sdk-referenceonly-docs", |
| 341 | defaults: ["framework-docs-default"], |
| 342 | srcs: [ |
| 343 | ":framework-doc-system-stubs", |
| 344 | ], |
| 345 | hdf: [ |
| 346 | "android.whichdoc offline", |
| 347 | ], |
| 348 | proofread_file: "offline-system-sdk-referenceonly-docs-proofrerad.txt", |
| 349 | args: framework_docs_only_args + " -hide 101 -hide 104 -hide 108" + |
| 350 | " -offlinemode -title \"Android System SDK\" -referenceonly", |
| 351 | static_doc_index_redirect: "docs/docs-documentation-redirect.html", |
| 352 | static_doc_properties: "docs/source.properties", |
| 353 | } |
| 354 | |
| 355 | droiddoc { |
| 356 | name: "online-sdk-docs", |
| 357 | defaults: ["framework-docs-default"], |
| 358 | srcs: [ |
| 359 | ":framework-doc-stubs", |
| 360 | ], |
| 361 | hdf: [ |
| 362 | "android.whichdoc online", |
| 363 | "android.hasSamples true", |
| 364 | ], |
| 365 | proofread_file: "online-sdk-docs-proofrerad.txt", |
| 366 | args: framework_docs_only_args + |
| 367 | " -toroot / -samplegroup Admin " + |
| 368 | " -samplegroup Background " + |
| 369 | " -samplegroup Connectivity " + |
| 370 | " -samplegroup Content " + |
| 371 | " -samplegroup Input " + |
| 372 | " -samplegroup Media " + |
| 373 | " -samplegroup Notification " + |
| 374 | " -samplegroup RenderScript " + |
| 375 | " -samplegroup Security " + |
| 376 | " -samplegroup Sensors " + |
| 377 | " -samplegroup System " + |
| 378 | " -samplegroup Testing " + |
| 379 | " -samplegroup UI " + |
| 380 | " -samplegroup Views " + |
| 381 | " -samplegroup Wearable -samplesdir development/samples/browseable ", |
| 382 | } |
| 383 | |
| 384 | droiddoc { |
| 385 | name: "online-system-api-sdk-docs", |
| 386 | defaults: ["framework-docs-default"], |
| 387 | srcs: [ |
| 388 | ":framework-doc-system-stubs", |
| 389 | ], |
| 390 | hdf: [ |
| 391 | "android.whichdoc online", |
| 392 | "android.hasSamples true", |
| 393 | ], |
| 394 | proofread_file: "online-system-api-sdk-docs-proofrerad.txt", |
| 395 | args: framework_docs_only_args + |
| 396 | " -referenceonly " + |
| 397 | " -title \"Android SDK - Including system APIs.\" " + |
| 398 | " -hide 101 " + |
| 399 | " -hide 104 " + |
| 400 | " -hide 108 " + |
| 401 | " -toroot / -samplegroup Admin " + |
| 402 | " -samplegroup Background " + |
| 403 | " -samplegroup Connectivity " + |
| 404 | " -samplegroup Content " + |
| 405 | " -samplegroup Input " + |
| 406 | " -samplegroup Media " + |
| 407 | " -samplegroup Notification " + |
| 408 | " -samplegroup RenderScript " + |
| 409 | " -samplegroup Security " + |
| 410 | " -samplegroup Sensors " + |
| 411 | " -samplegroup System " + |
| 412 | " -samplegroup Testing " + |
| 413 | " -samplegroup UI " + |
| 414 | " -samplegroup Views " + |
| 415 | " -samplegroup Wearable -samplesdir development/samples/browseable ", |
| 416 | installable: false, |
| 417 | } |
| 418 | |
| 419 | droiddoc { |
| 420 | name: "ds-docs-java", |
| 421 | defaults: ["framework-docs-default"], |
| 422 | srcs: [ |
| 423 | ":framework-doc-stubs", |
| 424 | ], |
| 425 | hdf: [ |
| 426 | "android.whichdoc online", |
| 427 | "android.hasSamples true", |
| 428 | ], |
| 429 | proofread_file: "ds-docs-proofrerad.txt", |
| 430 | args: framework_docs_only_args + |
| 431 | " -toroot / -yamlV2 -metalavaApiSince -samplegroup Admin " + |
| 432 | " -samplegroup Background " + |
| 433 | " -samplegroup Connectivity " + |
| 434 | " -samplegroup Content " + |
| 435 | " -samplegroup Input " + |
| 436 | " -samplegroup Media " + |
| 437 | " -samplegroup Notification " + |
| 438 | " -samplegroup RenderScript " + |
| 439 | " -samplegroup Security " + |
| 440 | " -samplegroup Sensors " + |
| 441 | " -samplegroup System " + |
| 442 | " -samplegroup Testing " + |
| 443 | " -samplegroup UI " + |
| 444 | " -samplegroup Views " + |
| 445 | " -samplegroup Wearable -devsite -samplesdir development/samples/browseable ", |
| 446 | } |
| 447 | |
| 448 | droiddoc { |
| 449 | name: "ds-docs-kt", |
| 450 | defaults: ["framework-dokka-docs-default"], |
| 451 | srcs: [ |
| 452 | ":framework-doc-stubs", |
| 453 | ], |
| 454 | 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] | 455 | "-noStdlibLink", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 456 | proofread_file: "ds-dokka-proofread.txt", |
| 457 | dokka_enabled: true, |
| 458 | } |
| 459 | |
| 460 | java_genrule { |
| 461 | name: "ds-docs", |
| 462 | tools: [ |
| 463 | "zip2zip", |
| 464 | "merge_zips", |
| 465 | ], |
| 466 | srcs: [ |
| 467 | ":ds-docs-java{.docs.zip}", |
| 468 | ":ds-docs-kt{.docs.zip}", |
| 469 | ], |
| 470 | out: ["ds-docs.zip"], |
| 471 | dist: { |
| 472 | targets: ["docs"], |
| 473 | }, |
| 474 | 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] | 475 | "$(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] | 476 | } |
| 477 | |
| 478 | java_genrule { |
| 479 | name: "ds-docs-switched", |
| 480 | tools: [ |
| 481 | "switcher4", |
| 482 | "soong_zip", |
| 483 | ], |
| 484 | srcs: [ |
| 485 | ":ds-docs-java{.docs.zip}", |
| 486 | ":ds-docs-kt{.docs.zip}", |
| 487 | ], |
| 488 | out: ["ds-docs-switched.zip"], |
| 489 | dist: { |
| 490 | targets: ["docs"], |
| 491 | }, |
Colin Cross | a2410eb | 2020-02-26 13:04:57 -0800 | [diff] [blame] | 492 | cmd: "unzip -q $(location :ds-docs-java{.docs.zip}) -d $(genDir) && " + |
Dan Willemsen | cece97c | 2020-04-20 22:32:45 -0700 | [diff] [blame] | 493 | "unzip -q $(location :ds-docs-kt{.docs.zip}) -d $(genDir)/en/reference/kotlin && " + |
| 494 | "SWITCHER=$$(cd $$(dirname $(location switcher4)) && pwd)/$$(basename $(location switcher4)) && " + |
| 495 | "(cd $(genDir)/en/reference && $$SWITCHER --work platform) > /dev/null && " + |
| 496 | "$(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 497 | } |
| 498 | |
| 499 | droiddoc { |
| 500 | name: "ds-static-docs", |
| 501 | defaults: ["framework-docs-default"], |
| 502 | srcs: [ |
| 503 | ":framework-doc-stubs", |
| 504 | ], |
| 505 | hdf: [ |
| 506 | "android.whichdoc online", |
| 507 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 508 | args: framework_docs_only_args + |
| 509 | " -staticonly " + |
| 510 | " -toroot / " + |
| 511 | " -devsite " + |
| 512 | " -ignoreJdLinks ", |
| 513 | } |
| 514 | |
| 515 | droiddoc { |
| 516 | name: "ds-ref-navtree-docs", |
| 517 | defaults: ["framework-docs-default"], |
| 518 | srcs: [ |
| 519 | ":framework-doc-stubs", |
| 520 | ], |
| 521 | hdf: [ |
| 522 | "android.whichdoc online", |
| 523 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 524 | args: framework_docs_only_args + |
| 525 | " -toroot / " + |
| 526 | " -atLinksNavtree " + |
| 527 | " -navtreeonly ", |
| 528 | } |
| 529 | |
| 530 | droiddoc { |
| 531 | name: "online-sdk-dev-docs", |
| 532 | defaults: ["framework-docs-default"], |
| 533 | srcs: [ |
| 534 | ":framework-doc-stubs", |
| 535 | ], |
| 536 | hdf: [ |
| 537 | "android.whichdoc online", |
| 538 | "android.hasSamples true", |
| 539 | ], |
| 540 | proofread_file: "online-sdk-dev-docs-proofrerad.txt", |
| 541 | args: framework_docs_only_args + |
| 542 | " -toroot / -samplegroup Admin " + |
| 543 | " -samplegroup Background " + |
| 544 | " -samplegroup Connectivity " + |
| 545 | " -samplegroup Content " + |
| 546 | " -samplegroup Input " + |
| 547 | " -samplegroup Media " + |
| 548 | " -samplegroup Notification " + |
| 549 | " -samplegroup RenderScript " + |
| 550 | " -samplegroup Security " + |
| 551 | " -samplegroup Sensors " + |
| 552 | " -samplegroup System " + |
| 553 | " -samplegroup Testing " + |
| 554 | " -samplegroup UI " + |
| 555 | " -samplegroup Views " + |
| 556 | " -samplegroup Wearable -samplesdir development/samples/browseable ", |
| 557 | } |
| 558 | |
| 559 | droiddoc { |
| 560 | name: "hidden-docs", |
| 561 | defaults: ["framework-docs-default"], |
| 562 | srcs: [ |
| 563 | ":framework-doc-stubs", |
| 564 | ], |
| 565 | proofread_file: "hidden-docs-proofrerad.txt", |
| 566 | args: framework_docs_only_args + |
| 567 | " -referenceonly " + |
| 568 | " -title \"Android SDK - Including hidden APIs.\"", |
| 569 | } |