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