blob: a2dfc419cf08ce95aa77b2bf6a6865894f611d13 [file] [log] [blame]
Roshan Piusfa486582019-06-11 06:52:01 -07001//
2// Copyright (C) 2018 The Android Open Source Project
Dan Willemsencccec942018-11-16 16:48:19 -08003//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
Roshan Piusfa486582019-06-11 06:52:01 -070015//
16java_defaults {
Roshan Pius7cede7a2019-11-25 07:35:34 -080017 name: "wifi-service-common",
Roshan Piusfa486582019-06-11 06:52:01 -070018 min_sdk_version: "29",
Roshan Piusfa486582019-06-11 06:52:01 -070019 errorprone: {
20 javacflags: ["-Xep:CheckReturnValue:ERROR"],
21 },
22 product_variables: {
23 pdk: {
24 enabled: false,
25 },
26 },
Roshan Piusfa486582019-06-11 06:52:01 -070027}
Dan Willemsencccec942018-11-16 16:48:19 -080028
Roshan Pius7cede7a2019-11-25 07:35:34 -080029filegroup {
30 name: "wifi-service-srcs",
Roshan Piusfa486582019-06-11 06:52:01 -070031 srcs: [
Roshan Piusfa486582019-06-11 06:52:01 -070032 "java/**/*.java",
Roshan Piusfa486582019-06-11 06:52:01 -070033 "java/**/*.logtags",
Roshan Pius8ab6de22019-12-06 13:51:16 -080034 ":framework-wifi-service-shared-srcs",
Roshan Pius3027cec2020-01-16 09:18:52 -080035 ":net-utils-wifi-service-common-srcs",
Roshan Piusc126b1d2019-12-06 14:29:48 -080036 ":statslog-wifi-java-gen",
Roshan Piusfa486582019-06-11 06:52:01 -070037 ],
Roshan Pius7cede7a2019-11-25 07:35:34 -080038}
39
David Su9c2ef552020-01-09 13:55:21 -080040// pre-jarjar version of wifi-service that builds against pre-jarjar version of framework-wifi
Roshan Pius7cede7a2019-11-25 07:35:34 -080041java_library {
David Su9c2ef552020-01-09 13:55:21 -080042 name: "wifi-service-pre-jarjar",
43 installable: false,
Roshan Pius7cede7a2019-11-25 07:35:34 -080044 defaults: ["wifi-service-common"],
45 srcs: [ ":wifi-service-srcs" ],
David Sud39f7e82020-01-21 16:49:05 -080046 // java_api_finder must accompany `srcs`
47 plugins: ["java_api_finder"],
Roshan Piusfa486582019-06-11 06:52:01 -070048
David Suc5adc902019-12-17 17:27:47 -080049 // TODO(b/140299412) should be "core_current" since Wifi module is not allowed to use
50 // @CorePlatformApi's
51 sdk_version: "core_platform",
Roshan Piusfa486582019-06-11 06:52:01 -070052 libs: [
David Su35efbb52019-08-28 11:17:41 -070053 "error_prone_annotations",
David Su35efbb52019-08-28 11:17:41 -070054 "jsr305",
Roshan Pius39264382020-01-17 15:20:53 -080055 "framework-annotations-lib",
Roshan Pius723fc242020-01-17 13:45:29 -080056 "services-stubs",
David Suc5adc902019-12-17 17:27:47 -080057 // load the resources from the resources APK.
58 "wifi-service-resources",
David Su9c2ef552020-01-09 13:55:21 -080059 // need pre-jarjar symbols so that wifi-service can reference the original class names at
60 // compile time
61 "framework-wifi-pre-jarjar",
Anton Hanssoneb823622020-01-30 12:08:34 +000062 "android_module_lib_stubs_current",
Muhammad Qureshief50e702020-01-17 14:16:58 -080063 // TODO(b/146167933): Use framework-statsd-stubs instead.
64 "framework-statsd",
Roshan Pius723fc242020-01-17 13:45:29 -080065 "unsupportedappusage",
Roshan Piusfa486582019-06-11 06:52:01 -070066 ],
67
68 static_libs: [
69 "android.hardware.wifi-V1.0-java",
70 "android.hardware.wifi-V1.1-java",
71 "android.hardware.wifi-V1.2-java",
72 "android.hardware.wifi-V1.3-java",
Ahmed ElArabawy82155742019-07-23 15:33:54 -070073 "android.hardware.wifi-V1.4-java",
Roshan Piusfa486582019-06-11 06:52:01 -070074 "android.hardware.wifi.hostapd-V1.0-java",
75 "android.hardware.wifi.hostapd-V1.1-java",
Ahmed ElArabawyb2c4bd22019-12-06 21:12:51 -080076 "android.hardware.wifi.hostapd-V1.2-java",
Roshan Piusfa486582019-06-11 06:52:01 -070077 "android.hardware.wifi.supplicant-V1.0-java",
78 "android.hardware.wifi.supplicant-V1.1-java",
79 "android.hardware.wifi.supplicant-V1.2-java",
Jimmy Chenfdc02792019-07-04 16:49:38 +080080 "android.hardware.wifi.supplicant-V1.3-java",
Roshan Piusfa486582019-06-11 06:52:01 -070081 "android.hidl.manager-V1.2-java",
David Su35efbb52019-08-28 11:17:41 -070082 "androidx.annotation_annotation",
Roshan Pius7c970f42019-10-23 16:14:07 -070083 "bouncycastle-unbundled",
Roshan Piusfa486582019-06-11 06:52:01 -070084 "ksoap2",
David Suc5adc902019-12-17 17:27:47 -080085 // Note: libprotobuf-java-lite uses a few core platform APIs which
86 // does show up as @hide API usage. But, this can be safely ignored
87 // since the library uses reflection to ensure that the OS does provide
88 // the necessary core platform APIs.
Roshan Pius3ff9fc22019-11-05 12:37:59 -080089 "libprotobuf-java-lite",
Roshan Piusfa486582019-06-11 06:52:01 -070090 "libnanohttpd",
Roshan Pius520ff1c2019-12-09 06:56:15 -080091 "netd_aidl_interface-V2-java",
Roshan Pius7cede7a2019-11-25 07:35:34 -080092 "services.net",
David Su8a392f82020-01-12 15:37:50 -080093 "wifi-lite-protos",
94 "wifi-nano-protos",
David Suc5adc902019-12-17 17:27:47 -080095 "PlatformProperties",
Roshan Piusfa486582019-06-11 06:52:01 -070096 ],
David Su9c2ef552020-01-09 13:55:21 -080097}
98
99// wifi-service static library
100// ============================================================
101java_library {
102 name: "wifi-service",
103 defaults: ["wifi-service-common"],
104 installable: true,
105 static_libs: ["wifi-service-pre-jarjar"],
106
107 // need to include `libs` so that Soong doesn't complain about missing classes after jarjaring
108 libs: [
109 "framework-wifi",
Anton Hanssoneb823622020-01-30 12:08:34 +0000110 "android_module_lib_stubs_current",
Roshan Pius723fc242020-01-17 13:45:29 -0800111 "services-stubs",
David Su9c2ef552020-01-09 13:55:21 -0800112 ],
113
114 // TODO(b/140299412) should be "core_current" since Wifi module is not allowed to use
115 // @CorePlatformApi's
116 sdk_version: "core_platform",
Roshan Pius54584c12019-08-27 12:31:09 -0700117
118 required: [
David Su35efbb52019-08-28 11:17:41 -0700119 "services",
David Suc5adc902019-12-17 17:27:47 -0800120 "wifi-service-resources",
Roshan Pius54584c12019-08-27 12:31:09 -0700121 ],
Roshan Piusfa486582019-06-11 06:52:01 -0700122
David Su9c2ef552020-01-09 13:55:21 -0800123 jarjar_rules: ":wifi-jarjar-rules",
Roshan Pius7cede7a2019-11-25 07:35:34 -0800124 optimize: {
125 enabled: true,
126 shrink: true,
127 proguard_flags_files: ["proguard.flags"],
128 },
129 dex_preopt: {
130 enabled: false,
131 app_image: false,
132 },
133
Inseob Kimb7ae91a2020-01-15 22:58:50 +0900134 init_rc: [":wifi-init-rc"],
David Su7f0d3862020-01-03 14:23:56 -0800135
Jiyong Park7ee4eef2020-01-06 13:34:00 +0900136 visibility: [
137 "//frameworks/opt/net/wifi/service/apex",
138 "//frameworks/opt/net/wifi/tests/wifitests/apex",
139 ],
140 apex_available: [
141 "com.android.wifi",
142 "test_com.android.wifi",
143 ],
Roshan Piusfa486582019-06-11 06:52:01 -0700144}
Roshan Pius7cede7a2019-11-25 07:35:34 -0800145
Muhammad Qureshief50e702020-01-17 14:16:58 -0800146// Statsd auto-generated code
Roshan Piusc126b1d2019-12-06 14:29:48 -0800147// ============================================================
148genrule {
149 name: "statslog-wifi-java-gen",
150 tools: ["stats-log-api-gen"],
151 cmd: "$(location stats-log-api-gen) --java $(out) --module wifi " +
152 " --javaPackage com.android.server.wifi.proto --javaClass WifiStatsLog",
153 out: ["com/android/server/wifi/proto/WifiStatsLog.java"],
154}
155
Roshan Pius7cede7a2019-11-25 07:35:34 -0800156// APK to hold all the wifi overlayable resources.
157// TODO: This should be signed by a wifi specific certificate.
158// ============================================================
159android_app {
160 name: "wifi-service-resources",
161 defaults: ["wifi-service-common"],
162 resource_dirs: [
163 "res",
164 ],
165 privileged: true,
166 sdk_version: "system_current",
167 export_package_resources: true,
168 manifest: "AndroidManifest_Resources.xml",
169}
Inseob Kimb7ae91a2020-01-15 22:58:50 +0900170
171filegroup {
172 name: "wifi-init-rc",
173 srcs: ["wifi.rc"],
174}