Jeff Sharkey | 4d1d7b5 | 2020-05-04 15:31:07 -0600 | [diff] [blame] | 1 | java_defaults { |
| 2 | name: "services_defaults", |
| 3 | plugins: [ |
| 4 | "error_prone_android_framework", |
| 5 | ], |
| 6 | } |
| 7 | |
Jiyong Park | e86e89a | 2019-11-17 13:11:19 +0900 | [diff] [blame] | 8 | filegroup { |
| 9 | name: "services-main-sources", |
| 10 | srcs: ["java/**/*.java"], |
| 11 | path: "java", |
| 12 | visibility: ["//visibility:private"], |
| 13 | } |
| 14 | |
| 15 | filegroup { |
Andrei Onea | 6e69e44 | 2021-02-10 20:53:12 +0000 | [diff] [blame^] | 16 | name: "services-non-updatable-sources", |
Jiyong Park | e86e89a | 2019-11-17 13:11:19 +0900 | [diff] [blame] | 17 | srcs: [ |
| 18 | ":services.core-sources", |
| 19 | ":services.accessibility-sources", |
| 20 | ":services.appprediction-sources", |
| 21 | ":services.appwidget-sources", |
| 22 | ":services.autofill-sources", |
| 23 | ":services.backup-sources", |
Jiyong Park | abc72e4 | 2019-11-17 15:17:53 +0900 | [diff] [blame] | 24 | ":backuplib-sources", |
Jiyong Park | e86e89a | 2019-11-17 13:11:19 +0900 | [diff] [blame] | 25 | ":services.companion-sources", |
| 26 | ":services.contentcapture-sources", |
| 27 | ":services.contentsuggestions-sources", |
| 28 | ":services.coverage-sources", |
| 29 | ":services.devicepolicy-sources", |
| 30 | ":services.midi-sources", |
| 31 | ":services.net-sources", |
| 32 | ":services.print-sources", |
Yi Kong | a0bd2a9 | 2020-06-29 20:03:55 +0800 | [diff] [blame] | 33 | ":services.profcollect-sources", |
Jiyong Park | e86e89a | 2019-11-17 13:11:19 +0900 | [diff] [blame] | 34 | ":services.restrictions-sources", |
| 35 | ":services.startop.iorap-sources", |
| 36 | ":services.systemcaptions-sources", |
| 37 | ":services.usage-sources", |
| 38 | ":services.usb-sources", |
| 39 | ":services.voiceinteraction-sources", |
Roshan Pius | ea33fb9 | 2020-02-20 12:49:45 -0800 | [diff] [blame] | 40 | ":services.wifi-sources", |
Andrei Onea | 6e69e44 | 2021-02-10 20:53:12 +0000 | [diff] [blame^] | 41 | ], |
| 42 | visibility: ["//visibility:private"], |
| 43 | } |
| 44 | |
| 45 | filegroup { |
| 46 | name: "services-all-sources", |
| 47 | srcs: [ |
| 48 | ":services-non-updatable-sources", |
Hai Zhang | 76f0def | 2020-01-16 01:42:58 -0800 | [diff] [blame] | 49 | ":service-permission-sources", |
Muhammad Qureshi | 8ea733e | 2020-02-07 09:30:28 -0800 | [diff] [blame] | 50 | ":service-statsd-sources", |
Jiyong Park | e86e89a | 2019-11-17 13:11:19 +0900 | [diff] [blame] | 51 | ], |
| 52 | visibility: ["//visibility:private"], |
| 53 | } |
| 54 | |
Colin Cross | eb652a4 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 55 | // merge all required services into one jar |
| 56 | // ============================================================ |
| 57 | java_library { |
| 58 | name: "services", |
Colin Cross | a12c0f5 | 2018-06-27 11:00:11 -0700 | [diff] [blame] | 59 | installable: true, |
Colin Cross | eb652a4 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 60 | |
| 61 | dex_preopt: { |
| 62 | app_image: true, |
| 63 | profile: "art-profile", |
| 64 | }, |
| 65 | |
Jiyong Park | e86e89a | 2019-11-17 13:11:19 +0900 | [diff] [blame] | 66 | srcs: [":services-main-sources"], |
Colin Cross | eb652a4 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 67 | |
| 68 | // The convention is to name each service module 'services.$(module_name)' |
| 69 | static_libs: [ |
Colin Cross | 4c0b06b | 2017-12-12 19:43:04 -0800 | [diff] [blame] | 70 | "services.core", |
Colin Cross | eb652a4 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 71 | "services.accessibility", |
Sunny Goyal | 54e9134 | 2018-11-14 11:59:02 -0800 | [diff] [blame] | 72 | "services.appprediction", |
Colin Cross | eb652a4 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 73 | "services.appwidget", |
| 74 | "services.autofill", |
| 75 | "services.backup", |
| 76 | "services.companion", |
Felipe Leme | 749b889 | 2018-12-03 16:30:30 -0800 | [diff] [blame] | 77 | "services.contentcapture", |
Winson Chung | 3fb0f25 | 2019-01-08 17:41:55 -0800 | [diff] [blame] | 78 | "services.contentsuggestions", |
Colin Cross | eb652a4 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 79 | "services.coverage", |
| 80 | "services.devicepolicy", |
| 81 | "services.midi", |
| 82 | "services.net", |
Danning Chen | 20b32ed | 2019-12-18 16:52:03 -0800 | [diff] [blame] | 83 | "services.people", |
Colin Cross | eb652a4 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 84 | "services.print", |
Yi Kong | a0bd2a9 | 2020-06-29 20:03:55 +0800 | [diff] [blame] | 85 | "services.profcollect", |
Colin Cross | eb652a4 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 86 | "services.restrictions", |
Igor Murashkin | 4de1e16 | 2018-11-26 10:33:17 -0800 | [diff] [blame] | 87 | "services.startop", |
Robert Berry | 835123d | 2019-03-18 16:33:42 -0400 | [diff] [blame] | 88 | "services.systemcaptions", |
Colin Cross | eb652a4 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 89 | "services.usage", |
| 90 | "services.usb", |
| 91 | "services.voiceinteraction", |
Roshan Pius | ea33fb9 | 2020-02-20 12:49:45 -0800 | [diff] [blame] | 92 | "services.wifi", |
Dmitri Plotnikov | 4eaac3a | 2020-05-04 17:00:16 -0700 | [diff] [blame] | 93 | "service-blobstore", |
| 94 | "service-jobscheduler", |
Colin Cross | eb652a4 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 95 | "android.hidl.base-V1.0-java", |
| 96 | ], |
| 97 | |
| 98 | libs: [ |
| 99 | "android.hidl.manager-V1.0-java", |
Paul Duffin | 01fd6ff | 2020-06-02 11:41:13 +0100 | [diff] [blame] | 100 | "framework-tethering.stubs.module_lib", |
Colin Cross | eb652a4 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 101 | ], |
| 102 | |
| 103 | // Uncomment to enable output of certain warnings (deprecated, unchecked) |
| 104 | //javacflags: ["-Xlint"], |
Colin Cross | eb652a4 | 2017-12-05 09:46:29 -0800 | [diff] [blame] | 105 | } |
| 106 | |
Colin Cross | 3a7d899 | 2017-12-05 17:33:58 -0800 | [diff] [blame] | 107 | // native library |
| 108 | // ============================================================= |
| 109 | |
| 110 | cc_library_shared { |
| 111 | name: "libandroid_servers", |
| 112 | defaults: ["libservices.core-libs"], |
| 113 | whole_static_libs: ["libservices.core"], |
| 114 | } |
atrost | 86895aa | 2019-08-19 16:51:15 +0100 | [diff] [blame] | 115 | |
| 116 | platform_compat_config { |
| 117 | name: "services-platform-compat-config", |
atrost | 86895aa | 2019-08-19 16:51:15 +0100 | [diff] [blame] | 118 | src: ":services", |
| 119 | } |
Ulya Trafimovich | 0d1b063d6 | 2019-12-03 11:59:51 +0000 | [diff] [blame] | 120 | |
| 121 | filegroup { |
| 122 | name: "art-profile", |
| 123 | srcs: ["art-profile"], |
| 124 | } |
Jiyong Park | 759a269a | 2019-11-17 15:17:53 +0900 | [diff] [blame] | 125 | |
| 126 | // API stub |
| 127 | // ============================================================= |
| 128 | |
Andrei Onea | 6e69e44 | 2021-02-10 20:53:12 +0000 | [diff] [blame^] | 129 | stubs_defaults { |
| 130 | name: "services-stubs-default", |
Jiyong Park | 759a269a | 2019-11-17 15:17:53 +0900 | [diff] [blame] | 131 | installable: false, |
Makoto Onuki | 3d8cabd4 | 2020-02-03 10:32:52 -0800 | [diff] [blame] | 132 | args: " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.SYSTEM_SERVER\\)" + |
Jiyong Park | 759a269a | 2019-11-17 15:17:53 +0900 | [diff] [blame] | 133 | " --hide-annotation android.annotation.Hide" + |
Anton Hansson | ac119a3 | 2020-02-19 18:29:12 +0000 | [diff] [blame] | 134 | " --hide InternalClasses" + // com.android.* classes are okay in this interface |
| 135 | // TODO: remove the --hide options below |
Jiyong Park | 759a269a | 2019-11-17 15:17:53 +0900 | [diff] [blame] | 136 | " --hide-package com.google.android.startop.iorap" + |
Jiyong Park | 759a269a | 2019-11-17 15:17:53 +0900 | [diff] [blame] | 137 | " --hide DeprecationMismatch" + |
| 138 | " --hide HiddenTypedefConstant", |
Jiyong Park | 759a269a | 2019-11-17 15:17:53 +0900 | [diff] [blame] | 139 | visibility: ["//visibility:private"], |
Andrei Onea | 6e69e44 | 2021-02-10 20:53:12 +0000 | [diff] [blame^] | 140 | filter_packages: ["com.android."] |
| 141 | } |
| 142 | |
| 143 | droidstubs { |
| 144 | name: "services-stubs.sources", |
| 145 | srcs: [":services-all-sources"], |
| 146 | defaults: ["services-stubs-default"], |
Jiyong Park | 1a3b9b9 | 2019-12-20 16:29:45 +0900 | [diff] [blame] | 147 | check_api: { |
| 148 | current: { |
| 149 | api_file: "api/current.txt", |
| 150 | removed_api_file: "api/removed.txt", |
| 151 | }, |
Anton Hansson | 0decfb1 | 2020-02-19 11:35:09 +0000 | [diff] [blame] | 152 | last_released: { |
Anton Hansson | f68ddea | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 153 | api_file: ":android.api.system-server.latest", |
Anton Hansson | 960c675 | 2020-05-02 18:00:30 +0100 | [diff] [blame] | 154 | removed_api_file: ":removed.api.system-server.latest", |
Anton Hansson | ce55623 | 2021-01-22 16:40:06 +0000 | [diff] [blame] | 155 | baseline_file: ":android-incompatibilities.api.system-server.latest" |
Anton Hansson | 0decfb1 | 2020-02-19 11:35:09 +0000 | [diff] [blame] | 156 | }, |
| 157 | api_lint: { |
| 158 | enabled: true, |
Anton Hansson | f68ddea | 2020-05-02 17:49:26 +0100 | [diff] [blame] | 159 | new_since: ":android.api.system-server.latest", |
Anton Hansson | 0decfb1 | 2020-02-19 11:35:09 +0000 | [diff] [blame] | 160 | baseline_file: "api/lint-baseline.txt", |
| 161 | }, |
Jiyong Park | 1a3b9b9 | 2019-12-20 16:29:45 +0900 | [diff] [blame] | 162 | }, |
Anton Hansson | 85785fe | 2021-01-20 20:23:34 +0000 | [diff] [blame] | 163 | dists: [ |
| 164 | { |
| 165 | targets: ["sdk", "win_sdk"], |
| 166 | dir: "apistubs/android/system-server/api", |
| 167 | dest: "android.txt", |
| 168 | tag: ".api.txt" |
| 169 | }, |
| 170 | { |
| 171 | targets: ["sdk", "win_sdk"], |
| 172 | dir: "apistubs/android/system-server/api", |
| 173 | dest: "removed.txt", |
| 174 | tag: ".removed-api.txt", |
| 175 | }, |
| 176 | ] |
Jiyong Park | 759a269a | 2019-11-17 15:17:53 +0900 | [diff] [blame] | 177 | } |
| 178 | |
| 179 | java_library { |
Anton Hansson | bde7d4f | 2020-03-19 15:23:32 +0000 | [diff] [blame] | 180 | name: "android_system_server_stubs_current", |
Anton Hansson | a920550 | 2020-07-15 13:36:34 +0100 | [diff] [blame] | 181 | defaults: ["android_stubs_dists_default"], |
Jiyong Park | 759a269a | 2019-11-17 15:17:53 +0900 | [diff] [blame] | 182 | srcs: [":services-stubs.sources"], |
| 183 | installable: false, |
Anton Hansson | bde7d4f | 2020-03-19 15:23:32 +0000 | [diff] [blame] | 184 | static_libs: ["android_module_lib_stubs_current"], |
Anton Hansson | 4304e60 | 2020-07-21 12:55:48 +0100 | [diff] [blame] | 185 | sdk_version: "none", |
| 186 | system_modules: "none", |
| 187 | java_version: "1.8", |
Anton Hansson | a920550 | 2020-07-15 13:36:34 +0100 | [diff] [blame] | 188 | dist: { |
| 189 | dir: "apistubs/android/system-server", |
| 190 | }, |
Jiyong Park | 759a269a | 2019-11-17 15:17:53 +0900 | [diff] [blame] | 191 | } |
Andrei Onea | 6e69e44 | 2021-02-10 20:53:12 +0000 | [diff] [blame^] | 192 | |
| 193 | droidstubs { |
| 194 | name: "services-non-updatable-stubs.sources", |
| 195 | srcs: [":services-non-updatable-sources"], |
| 196 | defaults: ["services-stubs-default"], |
| 197 | check_api: { |
| 198 | current: { |
| 199 | api_file: "api/non-updatable-current.txt", |
| 200 | removed_api_file: "api/non-updatable-removed.txt", |
| 201 | }, |
| 202 | api_lint: { |
| 203 | enabled: true, |
| 204 | new_since: ":android-non-updatable.api.system-server.latest", |
| 205 | baseline_file: "api/non-updatable-lint-baseline.txt", |
| 206 | }, |
| 207 | }, |
| 208 | dists: [ |
| 209 | { |
| 210 | targets: ["sdk", "win_sdk"], |
| 211 | dir: "apistubs/android/system-server/api", |
| 212 | dest: "android-non-updatable.txt", |
| 213 | tag: ".api.txt" |
| 214 | }, |
| 215 | { |
| 216 | targets: ["sdk", "win_sdk"], |
| 217 | dir: "apistubs/android/system-server/api", |
| 218 | dest: "android-non-updatable-removed.tx", |
| 219 | tag: ".removed-api.txt", |
| 220 | }, |
| 221 | ] |
| 222 | } |