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