Anton Hansson | 24c88f4 | 2019-12-13 16:17:27 +0000 | [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 | mainline_stubs_args = |
| 16 | "--error UnhiddenSystemApi " + |
| 17 | "--hide BroadcastBehavior " + |
| 18 | "--hide DeprecationMismatch " + |
| 19 | "--hide HiddenSuperclass " + |
| 20 | "--hide HiddenTypedefConstant " + |
| 21 | "--hide HiddenTypeParameter " + |
| 22 | "--hide MissingPermission " + |
| 23 | "--hide RequiresPermission " + |
| 24 | "--hide SdkConstant " + |
| 25 | "--hide Todo " + |
| 26 | "--hide Typo " + |
| 27 | "--hide UnavailableSymbol " |
| 28 | |
Anton Hansson | 5036ab6 | 2019-12-17 10:03:52 +0000 | [diff] [blame] | 29 | // TODO: remove this server classes are cleaned up. |
| 30 | mainline_stubs_args += "--hide-package com.android.server " |
| 31 | |
Anton Hansson | a12addc | 2020-02-03 14:44:47 +0000 | [diff] [blame] | 32 | priv_apps = " " + |
| 33 | "--show-annotation android.annotation.SystemApi\\(" + |
Jiyong Park | b4f8a85 | 2020-02-25 17:12:30 +0900 | [diff] [blame] | 34 | "client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" + |
Anton Hansson | a12addc | 2020-02-03 14:44:47 +0000 | [diff] [blame] | 35 | "\\) " |
| 36 | |
| 37 | module_libs = " " + |
| 38 | " --show-annotation android.annotation.SystemApi\\(" + |
Jiyong Park | b4f8a85 | 2020-02-25 17:12:30 +0900 | [diff] [blame] | 39 | "client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" + |
Anton Hansson | a12addc | 2020-02-03 14:44:47 +0000 | [diff] [blame] | 40 | "\\) " |
| 41 | |
Anton Hansson | 24c88f4 | 2019-12-13 16:17:27 +0000 | [diff] [blame] | 42 | stubs_defaults { |
| 43 | name: "framework-module-stubs-defaults-publicapi", |
| 44 | args: mainline_stubs_args, |
| 45 | installable: false, |
Anton Hansson | 1527353 | 2020-03-09 19:14:28 +0000 | [diff] [blame] | 46 | sdk_version: "current", |
Anton Hansson | dc033c3 | 2020-01-17 19:03:34 +0000 | [diff] [blame] | 47 | check_api: { |
| 48 | current: { |
| 49 | api_file: "api/current.txt", |
| 50 | removed_api_file: "api/removed.txt", |
| 51 | }, |
| 52 | }, |
Anton Hansson | 24c88f4 | 2019-12-13 16:17:27 +0000 | [diff] [blame] | 53 | } |
| 54 | |
| 55 | stubs_defaults { |
| 56 | name: "framework-module-stubs-defaults-systemapi", |
Anton Hansson | a12addc | 2020-02-03 14:44:47 +0000 | [diff] [blame] | 57 | args: mainline_stubs_args + priv_apps, |
Anton Hansson | 3b9ac0c | 2020-03-13 16:28:21 +0000 | [diff] [blame] | 58 | libs: ["framework-annotations-lib"], |
Jiyong Park | 7be934f | 2020-01-06 16:22:32 +0900 | [diff] [blame] | 59 | installable: false, |
Anton Hansson | 1527353 | 2020-03-09 19:14:28 +0000 | [diff] [blame] | 60 | sdk_version: "system_current", |
Anton Hansson | dc033c3 | 2020-01-17 19:03:34 +0000 | [diff] [blame] | 61 | check_api: { |
| 62 | current: { |
| 63 | api_file: "api/system-current.txt", |
| 64 | removed_api_file: "api/system-removed.txt", |
| 65 | }, |
| 66 | }, |
Jiyong Park | 7be934f | 2020-01-06 16:22:32 +0900 | [diff] [blame] | 67 | } |
| 68 | |
Anton Hansson | a12addc | 2020-02-03 14:44:47 +0000 | [diff] [blame] | 69 | // The defaults for module_libs comes in two parts - defaults for API checks |
| 70 | // and defaults for stub generation. This is because we want the API txt |
| 71 | // files to *only* include the module_libs_api, but the stubs to include |
| 72 | // module_libs_api as well as priv_apps. |
| 73 | |
Jiyong Park | 7be934f | 2020-01-06 16:22:32 +0900 | [diff] [blame] | 74 | stubs_defaults { |
Anton Hansson | a12addc | 2020-02-03 14:44:47 +0000 | [diff] [blame] | 75 | name: "framework-module-api-defaults-module_libs_api", |
| 76 | args: mainline_stubs_args + module_libs, |
Anton Hansson | 3b9ac0c | 2020-03-13 16:28:21 +0000 | [diff] [blame] | 77 | libs: ["framework-annotations-lib"], |
Jiyong Park | 7be934f | 2020-01-06 16:22:32 +0900 | [diff] [blame] | 78 | installable: false, |
Anton Hansson | 1527353 | 2020-03-09 19:14:28 +0000 | [diff] [blame] | 79 | sdk_version: "module_current", |
Anton Hansson | dc033c3 | 2020-01-17 19:03:34 +0000 | [diff] [blame] | 80 | check_api: { |
| 81 | current: { |
| 82 | api_file: "api/module-lib-current.txt", |
| 83 | removed_api_file: "api/module-lib-removed.txt", |
| 84 | }, |
| 85 | }, |
Jiyong Park | 7be934f | 2020-01-06 16:22:32 +0900 | [diff] [blame] | 86 | } |
| 87 | |
| 88 | stubs_defaults { |
| 89 | name: "framework-module-stubs-defaults-module_libs_api", |
Anton Hansson | a12addc | 2020-02-03 14:44:47 +0000 | [diff] [blame] | 90 | args: mainline_stubs_args + module_libs + priv_apps, |
Anton Hansson | 3b9ac0c | 2020-03-13 16:28:21 +0000 | [diff] [blame] | 91 | libs: ["framework-annotations-lib"], |
Anton Hansson | 24c88f4 | 2019-12-13 16:17:27 +0000 | [diff] [blame] | 92 | installable: false, |
Anton Hansson | 1527353 | 2020-03-09 19:14:28 +0000 | [diff] [blame] | 93 | sdk_version: "module_current", |
Anton Hansson | 24c88f4 | 2019-12-13 16:17:27 +0000 | [diff] [blame] | 94 | } |