• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
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
10// Defaults for platform code that runs inside system_server
11java_defaults {
12    name: "platform_service_defaults",
13    plugins: ["error_prone_android_framework"],
14    errorprone: {
15        javacflags: [
16            // "-Xep:AndroidFrameworkBinderIdentity:ERROR",
17            "-Xep:AndroidFrameworkCompatChange:ERROR",
18            // "-Xep:AndroidFrameworkUid:ERROR",
19            // NOTE: only enable to generate local patchfiles
20            // "-XepPatchChecks:refaster:frameworks/base/errorprone/refaster/EfficientXml.java.refaster",
21            // "-XepPatchLocation:/tmp/refaster/",
22        ],
23    },
24}
25
26filegroup {
27    name: "services-main-sources",
28    srcs: [
29        "java/**/*.java",
30        "java/**/package.html",
31    ],
32    path: "java",
33    visibility: ["//visibility:private"],
34}
35
36filegroup {
37    name: "services-non-updatable-sources",
38    srcs: [
39        ":services.core-sources",
40        ":services.core-sources-am-wm",
41        "core/java/com/android/server/am/package.html",
42        ":services.accessibility-sources",
43        ":services.appprediction-sources",
44        ":services.appwidget-sources",
45        ":services.autofill-sources",
46        ":services.backup-sources",
47        ":backuplib-sources",
48        ":services.companion-sources",
49        ":services.contentcapture-sources",
50        ":services.contentsuggestions-sources",
51        ":services.coverage-sources",
52        ":services.devicepolicy-sources",
53        ":services.midi-sources",
54        ":services.musicsearch-sources",
55        ":services.net-sources",
56        ":services.print-sources",
57        ":services.profcollect-sources",
58        ":services.restrictions-sources",
59        ":services.searchui-sources",
60        ":services.smartspace-sources",
61        ":services.speech-sources",
62        ":services.startop.iorap-sources",
63        ":services.systemcaptions-sources",
64        ":services.translation-sources",
65        ":services.texttospeech-sources",
66        ":services.usage-sources",
67        ":services.usb-sources",
68        ":services.uwb-sources",
69        ":services.voiceinteraction-sources",
70        ":services.wifi-sources",
71    ],
72    visibility: ["//visibility:private"],
73}
74
75java_library {
76    name: "Slogf",
77    srcs: ["core/java/com/android/server/utils/Slogf.java"],
78}
79
80// merge all required services into one jar
81// ============================================================
82java_library {
83    name: "services",
84    installable: true,
85
86    dex_preopt: {
87        app_image: true,
88        profile: "art-profile",
89    },
90
91    srcs: [":services-main-sources"],
92
93    // The convention is to name each service module 'services.$(module_name)'
94    static_libs: [
95        "services.core",
96        "services.accessibility",
97        "services.appprediction",
98        "services.appwidget",
99        "services.autofill",
100        "services.backup",
101        "services.companion",
102        "services.contentcapture",
103        "services.contentsuggestions",
104        "services.coverage",
105        "services.devicepolicy",
106        "services.midi",
107        "services.musicsearch",
108        "services.net",
109        "services.people",
110        "services.print",
111        "services.profcollect",
112        "services.restrictions",
113        "services.searchui",
114        "services.smartspace",
115        "services.speech",
116        "services.startop",
117        "services.systemcaptions",
118        "services.translation",
119        "services.texttospeech",
120        "services.usage",
121        "services.usb",
122        "services.uwb",
123        "services.voiceinteraction",
124        "services.wifi",
125        "service-blobstore",
126        "service-jobscheduler",
127        "android.hidl.base-V1.0-java",
128    ],
129
130    libs: [
131        "android.hidl.manager-V1.0-java",
132        "framework-tethering.stubs.module_lib",
133    ],
134
135    // Uncomment to enable output of certain warnings (deprecated, unchecked)
136    //javacflags: ["-Xlint"],
137}
138
139// native library
140// =============================================================
141
142cc_library_shared {
143    name: "libandroid_servers",
144    defaults: ["libservices.core-libs"],
145    whole_static_libs: ["libservices.core"],
146}
147
148platform_compat_config {
149    name: "services-platform-compat-config",
150    src: ":services",
151}
152
153filegroup {
154    name: "art-profile",
155    srcs: ["art-profile"],
156}
157
158// API stub
159// =============================================================
160
161stubs_defaults {
162    name: "services-stubs-default",
163    installable: false,
164    args: " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.SYSTEM_SERVER\\)" +
165        " --hide-annotation android.annotation.Hide" +
166        " --hide InternalClasses" + // com.android.* classes are okay in this interface
167        // TODO: remove the --hide options below
168        " --hide-package com.google.android.startop.iorap" +
169        " --hide DeprecationMismatch" +
170        " --hide HiddenTypedefConstant",
171    visibility: ["//frameworks/base:__subpackages__"],
172    filter_packages: ["com.android."],
173}
174
175droidstubs {
176    name: "services-non-updatable-stubs",
177    srcs: [":services-non-updatable-sources"],
178    defaults: ["services-stubs-default"],
179    check_api: {
180        current: {
181            api_file: "api/current.txt",
182            removed_api_file: "api/removed.txt",
183        },
184        api_lint: {
185            enabled: true,
186            new_since: ":android-non-updatable.api.system-server.latest",
187            baseline_file: "api/lint-baseline.txt",
188        },
189    },
190    dists: [
191        {
192            targets: [
193                "sdk",
194                "win_sdk",
195            ],
196            dir: "apistubs/android/system-server/api",
197            dest: "android-non-updatable.txt",
198            tag: ".api.txt",
199        },
200        {
201            targets: [
202                "sdk",
203                "win_sdk",
204            ],
205            dir: "apistubs/android/system-server/api",
206            dest: "android-non-updatable-removed.txt",
207            tag: ".removed-api.txt",
208        },
209    ],
210}
211