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 stubs are generated: |
| 16 | // |
| 17 | // raw source files --(metalava)--> stub source files --(javac)--> stub jar files |
| 18 | // |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 19 | // - The metalava conversion is done by droidstub modules |
| 20 | // - The javac compilation is done by java_library modules |
| 21 | // |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 22 | // The metalava conversion is also responsible for creating API signature files |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 23 | // and comparing them against the checked in API signature, and also checking compatibility |
| 24 | // with the latest frozen API signature. |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 25 | |
| 26 | ///////////////////////////////////////////////////////////////////// |
Anton Hansson | 51861e7 | 2020-11-13 09:55:29 +0000 | [diff] [blame] | 27 | // These modules provide source files for the stub libraries |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 28 | ///////////////////////////////////////////////////////////////////// |
| 29 | |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 30 | droidstubs { |
| 31 | name: "api-stubs-docs-non-updatable", |
Anton Hansson | 9dce832 | 2022-01-24 14:14:33 +0000 | [diff] [blame] | 32 | defaults: [ |
| 33 | "android-non-updatable-stubs-defaults", |
| 34 | "module-classpath-stubs-defaults", |
| 35 | ], |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 36 | args: metalava_framework_docs_args, |
| 37 | check_api: { |
| 38 | current: { |
Anton Hansson | 6cbaff2 | 2020-10-29 15:28:19 +0000 | [diff] [blame] | 39 | api_file: "core/api/current.txt", |
| 40 | removed_api_file: "core/api/removed.txt", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 41 | }, |
Anton Hansson | 37e102e | 2020-10-05 16:42:40 +0100 | [diff] [blame] | 42 | last_released: { |
| 43 | api_file: ":android-non-updatable.api.public.latest", |
| 44 | removed_api_file: ":android-non-updatable-removed.api.public.latest", |
Anton Hansson | 7f3393d | 2021-04-12 11:56:53 +0100 | [diff] [blame] | 45 | baseline_file: ":android-non-updatable-incompatibilities.api.public.latest", |
Anton Hansson | 37e102e | 2020-10-05 16:42:40 +0100 | [diff] [blame] | 46 | }, |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 47 | api_lint: { |
| 48 | enabled: true, |
Anton Hansson | 4f90aa5 | 2021-06-04 22:23:59 +0100 | [diff] [blame] | 49 | new_since: ":android.api.public.latest", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 50 | }, |
| 51 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 52 | dists: [ |
| 53 | { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 54 | targets: ["sdk"], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 55 | dir: "apistubs/android/public/api", |
| 56 | dest: "android-non-updatable.txt", |
| 57 | tag: ".api.txt", |
| 58 | }, |
| 59 | { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 60 | targets: ["sdk"], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 61 | dir: "apistubs/android/public/api", |
| 62 | dest: "android-non-updatable-removed.txt", |
| 63 | tag: ".removed-api.txt", |
| 64 | }, |
| 65 | ], |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 66 | } |
| 67 | |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 68 | priv_apps = " --show-annotation android.annotation.SystemApi\\(" + |
| 69 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 70 | "\\)" |
| 71 | |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 72 | priv_apps_in_stubs = " --show-for-stub-purposes-annotation android.annotation.SystemApi\\(" + |
| 73 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 74 | "\\)" |
| 75 | |
| 76 | test = " --show-annotation android.annotation.TestApi" |
| 77 | |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 78 | module_libs = " --show-annotation android.annotation.SystemApi\\(" + |
| 79 | "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" + |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 80 | "\\)" |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 81 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 82 | droidstubs { |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 83 | name: "system-api-stubs-docs-non-updatable", |
Anton Hansson | 9dce832 | 2022-01-24 14:14:33 +0000 | [diff] [blame] | 84 | defaults: [ |
| 85 | "android-non-updatable-stubs-defaults", |
| 86 | "module-classpath-stubs-defaults", |
| 87 | ], |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 88 | args: metalava_framework_docs_args + priv_apps, |
| 89 | check_api: { |
| 90 | current: { |
Anton Hansson | 6cbaff2 | 2020-10-29 15:28:19 +0000 | [diff] [blame] | 91 | api_file: "core/api/system-current.txt", |
| 92 | removed_api_file: "core/api/system-removed.txt", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 93 | }, |
Anton Hansson | 37e102e | 2020-10-05 16:42:40 +0100 | [diff] [blame] | 94 | last_released: { |
| 95 | api_file: ":android-non-updatable.api.system.latest", |
| 96 | removed_api_file: ":android-non-updatable-removed.api.system.latest", |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 97 | baseline_file: ":android-non-updatable-incompatibilities.api.system.latest", |
Anton Hansson | 37e102e | 2020-10-05 16:42:40 +0100 | [diff] [blame] | 98 | }, |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 99 | api_lint: { |
| 100 | enabled: true, |
Anton Hansson | 4f90aa5 | 2021-06-04 22:23:59 +0100 | [diff] [blame] | 101 | new_since: ":android.api.system.latest", |
Anton Hansson | 6cbaff2 | 2020-10-29 15:28:19 +0000 | [diff] [blame] | 102 | baseline_file: "core/api/system-lint-baseline.txt", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 103 | }, |
| 104 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 105 | dists: [ |
| 106 | { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 107 | targets: ["sdk"], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 108 | dir: "apistubs/android/system/api", |
| 109 | dest: "android-non-updatable.txt", |
| 110 | tag: ".api.txt", |
| 111 | }, |
| 112 | { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 113 | targets: ["sdk"], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 114 | dir: "apistubs/android/system/api", |
| 115 | dest: "android-non-updatable-removed.txt", |
| 116 | tag: ".removed-api.txt", |
| 117 | }, |
| 118 | ], |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 119 | } |
| 120 | |
| 121 | droidstubs { |
Anton Hansson | 022aac5 | 2020-11-05 10:45:13 +0000 | [diff] [blame] | 122 | name: "test-api-stubs-docs-non-updatable", |
Anton Hansson | 9dce832 | 2022-01-24 14:14:33 +0000 | [diff] [blame] | 123 | defaults: [ |
| 124 | "android-non-updatable-stubs-defaults", |
| 125 | "module-classpath-stubs-defaults", |
| 126 | ], |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 127 | args: metalava_framework_docs_args + test + priv_apps_in_stubs, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 128 | check_api: { |
| 129 | current: { |
Anton Hansson | 022aac5 | 2020-11-05 10:45:13 +0000 | [diff] [blame] | 130 | api_file: "core/api/test-current.txt", |
| 131 | removed_api_file: "core/api/test-removed.txt", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 132 | }, |
| 133 | api_lint: { |
| 134 | enabled: true, |
Anton Hansson | 022aac5 | 2020-11-05 10:45:13 +0000 | [diff] [blame] | 135 | baseline_file: "core/api/test-lint-baseline.txt", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 136 | }, |
| 137 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 138 | dists: [ |
| 139 | { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 140 | targets: ["sdk"], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 141 | dir: "apistubs/android/test/api", |
| 142 | dest: "android.txt", |
| 143 | tag: ".api.txt", |
| 144 | }, |
| 145 | { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 146 | targets: ["sdk"], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 147 | dir: "apistubs/android/test/api", |
| 148 | dest: "removed.txt", |
| 149 | tag: ".removed-api.txt", |
| 150 | }, |
| 151 | { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 152 | targets: ["sdk"], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 153 | dir: "apistubs/android/test/api", |
| 154 | dest: "android-non-updatable.txt", |
| 155 | tag: ".api.txt", |
| 156 | }, |
| 157 | { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 158 | targets: ["sdk"], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 159 | dir: "apistubs/android/test/api", |
| 160 | dest: "android-non-updatable-removed.txt", |
| 161 | tag: ".removed-api.txt", |
| 162 | }, |
| 163 | ], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 164 | } |
| 165 | |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 166 | droidstubs { |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 167 | name: "module-lib-api-stubs-docs-non-updatable", |
Anton Hansson | 9dce832 | 2022-01-24 14:14:33 +0000 | [diff] [blame] | 168 | defaults: [ |
| 169 | "android-non-updatable-stubs-defaults", |
| 170 | "module-classpath-stubs-defaults", |
| 171 | ], |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 172 | args: metalava_framework_docs_args + priv_apps_in_stubs + module_libs, |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 173 | check_api: { |
| 174 | current: { |
Anton Hansson | 6cbaff2 | 2020-10-29 15:28:19 +0000 | [diff] [blame] | 175 | api_file: "core/api/module-lib-current.txt", |
| 176 | removed_api_file: "core/api/module-lib-removed.txt", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 177 | }, |
Anton Hansson | c3ef1f56 | 2020-10-07 14:55:36 +0100 | [diff] [blame] | 178 | last_released: { |
| 179 | api_file: ":android-non-updatable.api.module-lib.latest", |
| 180 | removed_api_file: ":android-non-updatable-removed.api.module-lib.latest", |
Junyu Lai | 2dbb177 | 2022-01-12 17:38:02 +0000 | [diff] [blame] | 181 | baseline_file: ":android-non-updatable-incompatibilities.api.module-lib.latest", |
Anton Hansson | c3ef1f56 | 2020-10-07 14:55:36 +0100 | [diff] [blame] | 182 | }, |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 183 | api_lint: { |
| 184 | enabled: true, |
Anton Hansson | 4f90aa5 | 2021-06-04 22:23:59 +0100 | [diff] [blame] | 185 | new_since: ":android.api.module-lib.latest", |
Anton Hansson | 1f44941 | 2021-06-04 22:30:52 +0100 | [diff] [blame] | 186 | baseline_file: "core/api/module-lib-lint-baseline.txt", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 187 | }, |
| 188 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 189 | dists: [ |
| 190 | { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 191 | targets: ["sdk"], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 192 | dir: "apistubs/android/module-lib/api", |
| 193 | dest: "android-non-updatable.txt", |
| 194 | tag: ".api.txt", |
| 195 | }, |
| 196 | { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 197 | targets: ["sdk"], |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 198 | dir: "apistubs/android/module-lib/api", |
| 199 | dest: "android-non-updatable-removed.txt", |
| 200 | tag: ".removed-api.txt", |
| 201 | }, |
| 202 | ], |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 203 | } |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 204 | |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 205 | ///////////////////////////////////////////////////////////////////// |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 206 | // android_*_stubs_current modules are the stubs libraries compiled |
Anton Hansson | 2feb3f1 | 2020-11-13 11:44:32 +0000 | [diff] [blame] | 207 | // from stub sources |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 208 | ///////////////////////////////////////////////////////////////////// |
| 209 | |
| 210 | java_defaults { |
Anton Hansson | f8f417e | 2022-03-03 15:14:04 +0000 | [diff] [blame] | 211 | name: "android.jar_defaults", |
| 212 | sdk_version: "none", |
| 213 | system_modules: "none", |
| 214 | java_version: "1.8", |
| 215 | compile_dex: true, |
| 216 | defaults_visibility: ["//visibility:private"], |
| 217 | visibility: ["//visibility:public"], |
| 218 | } |
| 219 | |
| 220 | java_defaults { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 221 | name: "android-non-updatable_defaults_stubs_current", |
| 222 | libs: ["stub-annotations"], |
| 223 | static_libs: ["framework-res-package-jar"], // Export package of framework-res |
Anton Hansson | fbd32f3 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 224 | sdk_version: "none", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 225 | system_modules: "none", |
| 226 | java_version: "1.8", |
| 227 | compile_dex: true, |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 228 | dist: { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 229 | targets: ["sdk"], |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 230 | tag: ".jar", |
| 231 | dest: "android-non-updatable.jar", |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 232 | }, |
Anton Hansson | 8692568 | 2021-04-14 14:54:43 +0100 | [diff] [blame] | 233 | defaults_visibility: ["//visibility:private"], |
| 234 | visibility: ["//visibility:private"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 235 | } |
| 236 | |
Neha Pattan | 2edfc48 | 2022-03-02 17:37:23 +0000 | [diff] [blame] | 237 | java_library { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 238 | name: "android-non-updatable.stubs", |
| 239 | defaults: ["android-non-updatable_defaults_stubs_current"], |
| 240 | srcs: [":api-stubs-docs-non-updatable"], |
Anton Hansson | 04ab8c6 | 2022-01-25 15:53:43 +0000 | [diff] [blame] | 241 | libs: ["all-modules-public-stubs"], |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 242 | dist: { |
| 243 | dir: "apistubs/android/public", |
| 244 | }, |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 245 | } |
| 246 | |
Neha Pattan | 2edfc48 | 2022-03-02 17:37:23 +0000 | [diff] [blame] | 247 | java_library { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 248 | name: "android-non-updatable.stubs.system", |
| 249 | defaults: ["android-non-updatable_defaults_stubs_current"], |
Anton Hansson | 240ee48 | 2021-04-14 12:52:00 +0100 | [diff] [blame] | 250 | srcs: [":system-api-stubs-docs-non-updatable"], |
Anton Hansson | 04ab8c6 | 2022-01-25 15:53:43 +0000 | [diff] [blame] | 251 | libs: ["all-modules-system-stubs"], |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 252 | dist: { |
| 253 | dir: "apistubs/android/system", |
| 254 | }, |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 255 | } |
| 256 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 257 | java_library { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 258 | name: "android-non-updatable.stubs.module_lib", |
| 259 | defaults: ["android-non-updatable_defaults_stubs_current"], |
| 260 | srcs: [":module-lib-api-stubs-docs-non-updatable"], |
| 261 | libs: [ |
markchien | cd813a3 | 2021-11-11 00:42:55 +0800 | [diff] [blame] | 262 | "sdk_module-lib_current_framework-tethering", |
paulhu | e074dd2 | 2022-02-08 21:23:06 +0800 | [diff] [blame] | 263 | "sdk_module-lib_current_framework-connectivity-t", |
Roopa Sattiraju | 8e30577 | 2022-01-20 10:05:19 -0800 | [diff] [blame] | 264 | "sdk_public_current_framework-bluetooth", |
| 265 | // NOTE: The below can be removed once the prebuilt stub contains bluetooth. |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 266 | "sdk_system_current_android", |
| 267 | // NOTE: The below can be removed once the prebuilt stub contains IKE. |
| 268 | "sdk_system_current_android.net.ipsec.ike", |
| 269 | ], |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 270 | dist: { |
| 271 | dir: "apistubs/android/module-lib", |
| 272 | }, |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 273 | } |
| 274 | |
Neha Pattan | 2edfc48 | 2022-03-02 17:37:23 +0000 | [diff] [blame] | 275 | java_library { |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 276 | name: "android-non-updatable.stubs.test", |
| 277 | defaults: ["android-non-updatable_defaults_stubs_current"], |
| 278 | srcs: [":test-api-stubs-docs-non-updatable"], |
Anton Hansson | 04ab8c6 | 2022-01-25 15:53:43 +0000 | [diff] [blame] | 279 | libs: ["all-modules-system-stubs"], |
Anton Hansson | a410891 | 2021-04-09 13:40:11 +0100 | [diff] [blame] | 280 | dist: { |
| 281 | dir: "apistubs/android/test", |
| 282 | }, |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 283 | } |
| 284 | |
| 285 | java_defaults { |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 286 | name: "android_stubs_dists_default", |
| 287 | dist: { |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 288 | targets: ["sdk"], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 289 | tag: ".jar", |
| 290 | dest: "android.jar", |
| 291 | }, |
Anton Hansson | 8692568 | 2021-04-14 14:54:43 +0100 | [diff] [blame] | 292 | defaults_visibility: ["//frameworks/base/services"], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 293 | } |
| 294 | |
Neha Pattan | 2edfc48 | 2022-03-02 17:37:23 +0000 | [diff] [blame] | 295 | java_library { |
Anton Hansson | 65aa6ea | 2020-11-03 19:35:56 +0000 | [diff] [blame] | 296 | name: "android_stubs_current", |
Anton Hansson | 04ab8c6 | 2022-01-25 15:53:43 +0000 | [diff] [blame] | 297 | static_libs: [ |
| 298 | "all-modules-public-stubs", |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 299 | "android-non-updatable.stubs", |
Anton Hansson | bf63f94 | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 300 | "private-stub-annotations-jar", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 301 | ], |
Anton Hansson | 65057af | 2021-04-14 18:52:08 +0100 | [diff] [blame] | 302 | defaults: ["android.jar_defaults"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 303 | } |
| 304 | |
Neha Pattan | 2edfc48 | 2022-03-02 17:37:23 +0000 | [diff] [blame] | 305 | java_library { |
Anton Hansson | 65aa6ea | 2020-11-03 19:35:56 +0000 | [diff] [blame] | 306 | name: "android_system_stubs_current", |
Anton Hansson | 04ab8c6 | 2022-01-25 15:53:43 +0000 | [diff] [blame] | 307 | static_libs: [ |
| 308 | "all-modules-system-stubs", |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 309 | "android-non-updatable.stubs.system", |
Anton Hansson | bf63f94 | 2020-05-20 12:06:23 +0100 | [diff] [blame] | 310 | "private-stub-annotations-jar", |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 311 | ], |
Anton Hansson | c3002e5 | 2020-11-18 18:23:55 +0000 | [diff] [blame] | 312 | defaults: [ |
Anton Hansson | 65057af | 2021-04-14 18:52:08 +0100 | [diff] [blame] | 313 | "android.jar_defaults", |
Anton Hansson | c3002e5 | 2020-11-18 18:23:55 +0000 | [diff] [blame] | 314 | "android_stubs_dists_default", |
| 315 | ], |
| 316 | dist: { |
| 317 | dir: "apistubs/android/system", |
| 318 | }, |
| 319 | dists: [ |
| 320 | { |
| 321 | // Legacy dist path |
Anton Hansson | dd8ef67 | 2022-01-04 08:53:19 +0000 | [diff] [blame] | 322 | targets: ["sdk"], |
Anton Hansson | c3002e5 | 2020-11-18 18:23:55 +0000 | [diff] [blame] | 323 | tag: ".jar", |
| 324 | dest: "android_system.jar", |
| 325 | }, |
| 326 | ], |
Anton Hansson | 76d3db4 | 2020-04-09 14:16:37 +0100 | [diff] [blame] | 327 | } |
| 328 | |
Neha Pattan | 2edfc48 | 2022-03-02 17:37:23 +0000 | [diff] [blame] | 329 | java_library { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 330 | name: "android_test_stubs_current", |
Anton Hansson | 33b9b85 | 2021-04-09 10:12:45 +0100 | [diff] [blame] | 331 | // Modules do not have test APIs, but we want to include their SystemApis, like we include |
| 332 | // the SystemApi of framework-non-updatable-sources. |
Anton Hansson | 04ab8c6 | 2022-01-25 15:53:43 +0000 | [diff] [blame] | 333 | static_libs: [ |
| 334 | "all-modules-system-stubs", |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 335 | "android-non-updatable.stubs.test", |
Anton Hansson | 7ce31c1 | 2020-10-15 18:38:49 +0100 | [diff] [blame] | 336 | "private-stub-annotations-jar", |
| 337 | ], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 338 | defaults: [ |
Anton Hansson | 65057af | 2021-04-14 18:52:08 +0100 | [diff] [blame] | 339 | "android.jar_defaults", |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 340 | "android_stubs_dists_default", |
| 341 | ], |
| 342 | dist: { |
| 343 | dir: "apistubs/android/test", |
| 344 | }, |
Jiyong Park | e309516 | 2019-12-20 15:30:28 +0900 | [diff] [blame] | 345 | } |
| 346 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 347 | java_library { |
Anton Hansson | 1b9cf09 | 2020-01-30 12:09:02 +0000 | [diff] [blame] | 348 | name: "android_module_lib_stubs_current", |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 349 | defaults: [ |
Anton Hansson | 65057af | 2021-04-14 18:52:08 +0100 | [diff] [blame] | 350 | "android.jar_defaults", |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 351 | "android_stubs_dists_default", |
| 352 | ], |
Anton Hansson | a4748cd | 2021-04-09 10:16:19 +0100 | [diff] [blame] | 353 | static_libs: [ |
| 354 | "android-non-updatable.stubs.module_lib", |
Victor Chang | 6b107a9 | 2021-06-17 23:49:42 +0100 | [diff] [blame] | 355 | "art.module.public.api.stubs.module_lib", |
Giulio Fiscella | 68a0411 | 2021-11-30 16:32:44 +0000 | [diff] [blame] | 356 | "i18n.module.public.api.stubs", |
Anton Hansson | b7d532e | 2021-02-05 11:40:25 +0000 | [diff] [blame] | 357 | ], |
Anton Hansson | 53cf0ba | 2020-08-18 12:35:31 +0000 | [diff] [blame] | 358 | dist: { |
| 359 | dir: "apistubs/android/module-lib", |
| 360 | }, |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 361 | } |
| 362 | |
Andrei Onea | faa271a | 2021-03-17 13:32:51 +0000 | [diff] [blame] | 363 | java_library { |
| 364 | name: "android_system_server_stubs_current", |
| 365 | defaults: ["android_stubs_dists_default"], |
| 366 | srcs: [":services-non-updatable-stubs"], |
| 367 | installable: false, |
| 368 | static_libs: [ |
| 369 | "android_module_lib_stubs_current", |
| 370 | ], |
| 371 | sdk_version: "none", |
| 372 | system_modules: "none", |
| 373 | java_version: "1.8", |
| 374 | dist: { |
| 375 | dir: "apistubs/android/system-server", |
| 376 | }, |
| 377 | } |
| 378 | |
Anton Hansson | 36bc27c | 2021-09-14 15:45:13 +0100 | [diff] [blame] | 379 | //////////////////////////////////////////////////////////////////////// |
| 380 | // api-versions.xml generation, for public and system. This API database |
| 381 | // also contains the android.test.* APIs. |
| 382 | //////////////////////////////////////////////////////////////////////// |
| 383 | |
| 384 | java_library { |
| 385 | name: "android_stubs_current_with_test_libs", |
| 386 | static_libs: [ |
| 387 | "android_stubs_current", |
| 388 | "android.test.base.stubs", |
| 389 | "android.test.mock.stubs", |
| 390 | "android.test.runner.stubs", |
| 391 | ], |
| 392 | defaults: ["android.jar_defaults"], |
| 393 | visibility: [ |
| 394 | "//visibility:override", |
| 395 | "//visibility:private", |
| 396 | ], |
| 397 | } |
| 398 | |
| 399 | java_library { |
| 400 | name: "android_system_stubs_current_with_test_libs", |
| 401 | static_libs: [ |
| 402 | "android_system_stubs_current", |
| 403 | "android.test.base.stubs.system", |
| 404 | "android.test.mock.stubs.system", |
| 405 | "android.test.runner.stubs.system", |
| 406 | ], |
| 407 | defaults: ["android.jar_defaults"], |
| 408 | visibility: [ |
| 409 | "//visibility:override", |
| 410 | "//visibility:private", |
| 411 | ], |
| 412 | } |
| 413 | |
| 414 | droidstubs { |
| 415 | name: "api_versions_public", |
| 416 | srcs: [":android_stubs_current_with_test_libs{.jar}"], |
| 417 | generate_stubs: false, |
| 418 | api_levels_annotations_enabled: true, |
| 419 | api_levels_annotations_dirs: [ |
| 420 | "sdk-dir", |
| 421 | "api-versions-jars-dir", |
| 422 | ], |
| 423 | } |
| 424 | |
| 425 | droidstubs { |
| 426 | name: "api_versions_system", |
| 427 | srcs: [":android_system_stubs_current_with_test_libs{.jar}"], |
| 428 | generate_stubs: false, |
| 429 | api_levels_annotations_enabled: true, |
| 430 | api_levels_annotations_dirs: [ |
| 431 | "sdk-dir", |
| 432 | "api-versions-jars-dir", |
| 433 | ], |
| 434 | api_levels_sdk_type: "system", |
| 435 | } |
| 436 | |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 437 | ///////////////////////////////////////////////////////////////////// |
| 438 | // hwbinder.stubs provides APIs required for building HIDL Java |
| 439 | // libraries. |
| 440 | ///////////////////////////////////////////////////////////////////// |
| 441 | |
| 442 | droidstubs { |
| 443 | name: "hwbinder-stubs-docs", |
| 444 | srcs: [ |
| 445 | "core/java/android/os/HidlSupport.java", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 446 | "core/java/android/os/HidlMemory.java", |
| 447 | "core/java/android/os/HwBinder.java", |
| 448 | "core/java/android/os/HwBlob.java", |
| 449 | "core/java/android/os/HwParcel.java", |
| 450 | "core/java/android/os/IHwBinder.java", |
| 451 | "core/java/android/os/IHwInterface.java", |
| 452 | "core/java/android/os/DeadObjectException.java", |
| 453 | "core/java/android/os/DeadSystemException.java", |
| 454 | "core/java/android/os/NativeHandle.java", |
| 455 | "core/java/android/os/RemoteException.java", |
| 456 | "core/java/android/util/AndroidException.java", |
| 457 | ], |
Colin Cross | 037d7fb | 2021-03-25 17:01:55 -0700 | [diff] [blame] | 458 | libs: ["framework-annotations-lib"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 459 | installable: false, |
| 460 | sdk_version: "core_platform", |
| 461 | annotations_enabled: true, |
Anton Hansson | 48ee95e | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 462 | previous_api: ":android.api.public.latest", |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 463 | merge_annotations_dirs: [ |
| 464 | "metalava-manual", |
| 465 | ], |
Anton Hansson | 81969c2 | 2020-02-03 20:45:56 +0000 | [diff] [blame] | 466 | args: priv_apps, |
Anton Hansson | 8692568 | 2021-04-14 14:54:43 +0100 | [diff] [blame] | 467 | visibility: ["//visibility:private"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 468 | } |
| 469 | |
Anton Hansson | bbdd64b | 2021-04-26 18:47:39 +0100 | [diff] [blame] | 470 | java_library { |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 471 | name: "hwbinder.stubs", |
| 472 | sdk_version: "core_current", |
Colin Cross | 037d7fb | 2021-03-25 17:01:55 -0700 | [diff] [blame] | 473 | libs: ["framework-annotations-lib"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 474 | srcs: [ |
| 475 | ":hwbinder-stubs-docs", |
| 476 | ], |
Anton Hansson | 8692568 | 2021-04-14 14:54:43 +0100 | [diff] [blame] | 477 | visibility: ["//visibility:public"], |
Jiyong Park | 7fb4b18 | 2019-12-20 14:35:43 +0900 | [diff] [blame] | 478 | } |