blob: e721f8cc28d27bc87eb7f6b0371a0a1281161705 [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 Sue3c92162020-02-05 18:13:55 -080040filegroup {
41 name: "wifi-service-BaseWifiService",
42 srcs: ["java/com/android/server/wifi/BaseWifiService.java"],
43 path: "java",
44}
45
David Su9c2ef552020-01-09 13:55:21 -080046// pre-jarjar version of wifi-service that builds against pre-jarjar version of framework-wifi
Roshan Pius7cede7a2019-11-25 07:35:34 -080047java_library {
David Su9c2ef552020-01-09 13:55:21 -080048 name: "wifi-service-pre-jarjar",
49 installable: false,
Roshan Pius7cede7a2019-11-25 07:35:34 -080050 defaults: ["wifi-service-common"],
51 srcs: [ ":wifi-service-srcs" ],
David Sud39f7e82020-01-21 16:49:05 -080052 // java_api_finder must accompany `srcs`
53 plugins: ["java_api_finder"],
Roshan Piusfa486582019-06-11 06:52:01 -070054
David Su36fc0d22020-03-16 15:59:56 -070055 sdk_version: "system_server_current",
Roshan Piusfa486582019-06-11 06:52:01 -070056 libs: [
David Su35efbb52019-08-28 11:17:41 -070057 "error_prone_annotations",
David Su35efbb52019-08-28 11:17:41 -070058 "jsr305",
Roshan Pius39264382020-01-17 15:20:53 -080059 "framework-annotations-lib",
David Suc5adc902019-12-17 17:27:47 -080060 // load the resources from the resources APK.
David Su0a4bc5c2020-03-24 19:11:35 -070061 "ServiceWifiResources",
David Su9c2ef552020-01-09 13:55:21 -080062 // need pre-jarjar symbols so that wifi-service can reference the original class names at
63 // compile time
64 "framework-wifi-pre-jarjar",
Muhammad Qureshifd9a7932020-02-09 13:35:59 -080065 "framework-statsd-stubs-module_libs_api",
Roshan Pius723fc242020-01-17 13:45:29 -080066 "unsupportedappusage",
Roshan Piusfa486582019-06-11 06:52:01 -070067 ],
68
69 static_libs: [
70 "android.hardware.wifi-V1.0-java",
71 "android.hardware.wifi-V1.1-java",
72 "android.hardware.wifi-V1.2-java",
73 "android.hardware.wifi-V1.3-java",
Ahmed ElArabawy82155742019-07-23 15:33:54 -070074 "android.hardware.wifi-V1.4-java",
Roshan Piusfa486582019-06-11 06:52:01 -070075 "android.hardware.wifi.hostapd-V1.0-java",
76 "android.hardware.wifi.hostapd-V1.1-java",
Ahmed ElArabawyb2c4bd22019-12-06 21:12:51 -080077 "android.hardware.wifi.hostapd-V1.2-java",
Roshan Piusfa486582019-06-11 06:52:01 -070078 "android.hardware.wifi.supplicant-V1.0-java",
79 "android.hardware.wifi.supplicant-V1.1-java",
80 "android.hardware.wifi.supplicant-V1.2-java",
Jimmy Chenfdc02792019-07-04 16:49:38 +080081 "android.hardware.wifi.supplicant-V1.3-java",
Roshan Piusfa486582019-06-11 06:52:01 -070082 "android.hidl.manager-V1.2-java",
David Su35efbb52019-08-28 11:17:41 -070083 "androidx.annotation_annotation",
Roshan Pius7c970f42019-10-23 16:14:07 -070084 "bouncycastle-unbundled",
Roshan Piusfa486582019-06-11 06:52:01 -070085 "ksoap2",
David Suc5adc902019-12-17 17:27:47 -080086 // Note: libprotobuf-java-lite uses a few core platform APIs which
87 // does show up as @hide API usage. But, this can be safely ignored
88 // since the library uses reflection to ensure that the OS does provide
89 // the necessary core platform APIs.
Roshan Pius3ff9fc22019-11-05 12:37:59 -080090 "libprotobuf-java-lite",
Roshan Piusfa486582019-06-11 06:52:01 -070091 "libnanohttpd",
Roshan Pius97b65062020-02-21 07:39:09 -080092 "services.net-module-wifi",
David Su8a392f82020-01-12 15:37:50 -080093 "wifi-lite-protos",
Roshan Pius6117b532020-02-20 11:56:07 -080094 "wifi-nano-protos"
Roshan Piusfa486582019-06-11 06:52:01 -070095 ],
David Su9c2ef552020-01-09 13:55:21 -080096}
97
98// wifi-service static library
99// ============================================================
100java_library {
Roshan Pius44f8e092020-03-23 10:02:09 -0700101 name: "service-wifi",
David Su9c2ef552020-01-09 13:55:21 -0800102 defaults: ["wifi-service-common"],
103 installable: true,
104 static_libs: ["wifi-service-pre-jarjar"],
105
106 // need to include `libs` so that Soong doesn't complain about missing classes after jarjaring
107 libs: [
Paul Duffin951f9592020-05-17 20:27:33 +0100108 "framework-wifi.impl",
David Su9c2ef552020-01-09 13:55:21 -0800109 ],
110
David Su36fc0d22020-03-16 15:59:56 -0700111 sdk_version: "system_server_current",
Roshan Pius54584c12019-08-27 12:31:09 -0700112
David Su9c2ef552020-01-09 13:55:21 -0800113 jarjar_rules: ":wifi-jarjar-rules",
Roshan Pius7cede7a2019-11-25 07:35:34 -0800114 optimize: {
115 enabled: true,
116 shrink: true,
117 proguard_flags_files: ["proguard.flags"],
118 },
119 dex_preopt: {
120 enabled: false,
121 app_image: false,
122 },
123
Jiyong Park7ee4eef2020-01-06 13:34:00 +0900124 visibility: [
125 "//frameworks/opt/net/wifi/service/apex",
126 "//frameworks/opt/net/wifi/tests/wifitests/apex",
127 ],
128 apex_available: [
129 "com.android.wifi",
130 "test_com.android.wifi",
131 ],
Roshan Piusfa486582019-06-11 06:52:01 -0700132}
Roshan Pius7cede7a2019-11-25 07:35:34 -0800133
Muhammad Qureshief50e702020-01-17 14:16:58 -0800134// Statsd auto-generated code
Roshan Piusc126b1d2019-12-06 14:29:48 -0800135// ============================================================
136genrule {
137 name: "statslog-wifi-java-gen",
138 tools: ["stats-log-api-gen"],
139 cmd: "$(location stats-log-api-gen) --java $(out) --module wifi " +
140 " --javaPackage com.android.server.wifi.proto --javaClass WifiStatsLog",
141 out: ["com/android/server/wifi/proto/WifiStatsLog.java"],
142}
143
Roshan Pius7cede7a2019-11-25 07:35:34 -0800144// APK to hold all the wifi overlayable resources.
Roshan Pius7cede7a2019-11-25 07:35:34 -0800145// ============================================================
146android_app {
David Su0a4bc5c2020-03-24 19:11:35 -0700147 name: "ServiceWifiResources",
Roshan Pius7cede7a2019-11-25 07:35:34 -0800148 defaults: ["wifi-service-common"],
149 resource_dirs: [
150 "res",
151 ],
152 privileged: true,
153 sdk_version: "system_current",
154 export_package_resources: true,
155 manifest: "AndroidManifest_Resources.xml",
David Su0a4bc5c2020-03-24 19:11:35 -0700156 apex_available: [
157 "com.android.wifi",
158 "test_com.android.wifi",
159 ],
David Suabdcd812020-03-24 20:07:49 -0700160 certificate: ":com.android.wifi.resources.certificate",
161}
162
163android_app_certificate {
164 name: "com.android.wifi.resources.certificate",
165 certificate: "resources-certs/com.android.wifi.resources"
Roshan Pius7cede7a2019-11-25 07:35:34 -0800166}
Inseob Kimb7ae91a2020-01-15 22:58:50 +0900167
Roshan Pius9a858312020-02-20 07:48:44 -0800168// Prebuilt for the wifi.rc file.
169prebuilt_etc {
170 name: "wifi.rc",
171 src: "wifi.rc",
172 sub_dir: "init"
Inseob Kimb7ae91a2020-01-15 22:58:50 +0900173}