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