blob: 4f7a1d8db3792678c5d847012ef51c7225f5da73 [file] [log] [blame]
Roshan Pius09d08e62019-06-11 06:52:01 -07001//
2// Copyright (C) 2018 The Android Open Source Project
Dan Willemsenf877fb12018-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 Pius09d08e62019-06-11 06:52:01 -070015//
Bob Badourc446a522021-02-04 00:08:31 -080016package {
17 default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
Roshan Pius09d08e62019-06-11 06:52:01 -070020java_defaults {
Roshan Pius3b8fabe2019-11-25 07:35:34 -080021 name: "wifi-service-common",
David Sud2a7db52020-06-10 12:35:48 -070022 defaults: ["wifi-module-sdk-version-defaults"],
Roshan Pius09d08e62019-06-11 06:52:01 -070023 errorprone: {
24 javacflags: ["-Xep:CheckReturnValue:ERROR"],
25 },
26 product_variables: {
27 pdk: {
28 enabled: false,
29 },
30 },
Roshan Pius09d08e62019-06-11 06:52:01 -070031}
Dan Willemsenf877fb12018-11-16 16:48:19 -080032
Roshan Pius3b8fabe2019-11-25 07:35:34 -080033filegroup {
34 name: "wifi-service-srcs",
Roshan Pius09d08e62019-06-11 06:52:01 -070035 srcs: [
Roshan Pius09d08e62019-06-11 06:52:01 -070036 "java/**/*.java",
Roshan Pius09d08e62019-06-11 06:52:01 -070037 "java/**/*.logtags",
Roshan Piusa924b282019-12-06 13:51:16 -080038 ":framework-wifi-service-shared-srcs",
Roshan Piusdcc71be2020-01-16 09:18:52 -080039 ":net-utils-wifi-service-common-srcs",
Roshan Pius91cd4d82019-12-06 14:29:48 -080040 ":statslog-wifi-java-gen",
Quang Luong453e2ca2020-10-14 14:14:46 -070041 ":coex-table-parser",
Roshan Pius09d08e62019-06-11 06:52:01 -070042 ],
Roshan Pius3b8fabe2019-11-25 07:35:34 -080043}
44
David Su11ecb032020-02-05 18:13:55 -080045filegroup {
46 name: "wifi-service-BaseWifiService",
47 srcs: ["java/com/android/server/wifi/BaseWifiService.java"],
48 path: "java",
49}
50
David Sua4812762020-01-09 13:55:21 -080051// pre-jarjar version of wifi-service that builds against pre-jarjar version of framework-wifi
Roshan Pius3b8fabe2019-11-25 07:35:34 -080052java_library {
David Sua4812762020-01-09 13:55:21 -080053 name: "wifi-service-pre-jarjar",
54 installable: false,
Roshan Pius3b8fabe2019-11-25 07:35:34 -080055 defaults: ["wifi-service-common"],
56 srcs: [ ":wifi-service-srcs" ],
David Su227f5c42020-01-21 16:49:05 -080057 // java_api_finder must accompany `srcs`
58 plugins: ["java_api_finder"],
Roshan Pius09d08e62019-06-11 06:52:01 -070059
David Suc0148752020-03-16 15:59:56 -070060 sdk_version: "system_server_current",
Pedro Loureirod9f73f02021-02-25 15:32:11 +000061 lint: {
Nate Jiang703ff6e2021-07-08 17:07:55 -070062 baseline_filename: "lint-baseline-pre-jarjar.xml",
63 strict_updatability_linting: true,
Pedro Loureirod9f73f02021-02-25 15:32:11 +000064 },
Roshan Pius09d08e62019-06-11 06:52:01 -070065 libs: [
David Su8797c4d2019-08-28 11:17:41 -070066 "error_prone_annotations",
David Su8797c4d2019-08-28 11:17:41 -070067 "jsr305",
Roshan Pius07484ed2020-01-17 15:20:53 -080068 "framework-annotations-lib",
David Sube812672019-12-17 17:27:47 -080069 // load the resources from the resources APK.
David Sua72d9e32020-03-24 19:11:35 -070070 "ServiceWifiResources",
David Sua4812762020-01-09 13:55:21 -080071 // need pre-jarjar symbols so that wifi-service can reference the original class names at
72 // compile time
73 "framework-wifi-pre-jarjar",
Remi NGUYEN VAN37237ba2021-01-14 16:44:22 +090074 "framework-connectivity.stubs.module_lib",
Paul Duffin74793392020-05-31 11:53:23 +010075 "framework-statsd.stubs.module_lib",
Jimmy Chen7e07c1e2020-06-10 16:37:08 +080076 "framework-tethering.stubs.module_lib",
Roshan Pius4b22e3e2020-01-17 13:45:29 -080077 "unsupportedappusage",
Roshan Pius09d08e62019-06-11 06:52:01 -070078 ],
79
80 static_libs: [
81 "android.hardware.wifi-V1.0-java",
82 "android.hardware.wifi-V1.1-java",
83 "android.hardware.wifi-V1.2-java",
84 "android.hardware.wifi-V1.3-java",
Ahmed ElArabawyb0313172019-07-23 15:33:54 -070085 "android.hardware.wifi-V1.4-java",
Jimmy Chen361a8642020-07-15 11:06:21 +080086 "android.hardware.wifi-V1.5-java",
Roshan Pius09d08e62019-06-11 06:52:01 -070087 "android.hardware.wifi.hostapd-V1.0-java",
88 "android.hardware.wifi.hostapd-V1.1-java",
Ahmed ElArabawy4debf872019-12-06 21:12:51 -080089 "android.hardware.wifi.hostapd-V1.2-java",
lesl6ff62e42020-08-03 14:42:59 +080090 "android.hardware.wifi.hostapd-V1.3-java",
Roshan Pius09d08e62019-06-11 06:52:01 -070091 "android.hardware.wifi.supplicant-V1.0-java",
92 "android.hardware.wifi.supplicant-V1.1-java",
93 "android.hardware.wifi.supplicant-V1.2-java",
Jimmy Chen8fa928f2019-07-04 16:49:38 +080094 "android.hardware.wifi.supplicant-V1.3-java",
Jimmy Chen0a449522020-08-05 11:07:05 +080095 "android.hardware.wifi.supplicant-V1.4-java",
Roshan Pius09d08e62019-06-11 06:52:01 -070096 "android.hidl.manager-V1.2-java",
David Su8797c4d2019-08-28 11:17:41 -070097 "androidx.annotation_annotation",
Roshan Pius40e39ba2019-10-23 16:14:07 -070098 "bouncycastle-unbundled",
Roshan Pius09d08e62019-06-11 06:52:01 -070099 "ksoap2",
David Sube812672019-12-17 17:27:47 -0800100 // Note: libprotobuf-java-lite uses a few core platform APIs which
101 // does show up as @hide API usage. But, this can be safely ignored
102 // since the library uses reflection to ensure that the OS does provide
103 // the necessary core platform APIs.
Roshan Pius29d01bd2019-11-05 12:37:59 -0800104 "libprotobuf-java-lite",
Roshan Pius09d08e62019-06-11 06:52:01 -0700105 "libnanohttpd",
Roshan Piuse0125842020-02-21 07:39:09 -0800106 "services.net-module-wifi",
David Su8212e972020-01-12 15:37:50 -0800107 "wifi-lite-protos",
Chiachang Wang6e2e4852020-11-02 15:39:46 +0800108 "wifi-nano-protos",
Roshan Pius09d08e62019-06-11 06:52:01 -0700109 ],
David Sua4812762020-01-09 13:55:21 -0800110}
111
112// wifi-service static library
113// ============================================================
114java_library {
Roshan Piusb8d7fab2020-03-23 10:02:09 -0700115 name: "service-wifi",
David Sua4812762020-01-09 13:55:21 -0800116 defaults: ["wifi-service-common"],
117 installable: true,
118 static_libs: ["wifi-service-pre-jarjar"],
119
120 // need to include `libs` so that Soong doesn't complain about missing classes after jarjaring
121 libs: [
Paul Duffine3901082020-05-17 20:27:33 +0100122 "framework-wifi.impl",
David Sua4812762020-01-09 13:55:21 -0800123 ],
124
David Suc0148752020-03-16 15:59:56 -0700125 sdk_version: "system_server_current",
Roshan Pius26297092019-08-27 12:31:09 -0700126
David Sua4812762020-01-09 13:55:21 -0800127 jarjar_rules: ":wifi-jarjar-rules",
Roshan Pius3b8fabe2019-11-25 07:35:34 -0800128 optimize: {
129 enabled: true,
130 shrink: true,
131 proguard_flags_files: ["proguard.flags"],
132 },
133 dex_preopt: {
134 enabled: false,
135 app_image: false,
136 },
137
Jiyong Park2a77bfd2020-01-06 13:34:00 +0900138 visibility: [
139 "//frameworks/opt/net/wifi/service/apex",
140 "//frameworks/opt/net/wifi/tests/wifitests/apex",
Baligh Uddinbb5274a2020-12-24 06:01:25 +0000141 "//packages/modules/Wifi/apex",
142 "//packages/modules/Wifi/service/tests/wifitests/apex",
Jiyong Park2a77bfd2020-01-06 13:34:00 +0900143 ],
144 apex_available: [
145 "com.android.wifi",
146 "test_com.android.wifi",
147 ],
Roshan Pius09d08e62019-06-11 06:52:01 -0700148}
Roshan Pius3b8fabe2019-11-25 07:35:34 -0800149
Muhammad Qureshic9efc272020-01-17 14:16:58 -0800150// Statsd auto-generated code
Roshan Pius91cd4d82019-12-06 14:29:48 -0800151// ============================================================
152genrule {
153 name: "statslog-wifi-java-gen",
154 tools: ["stats-log-api-gen"],
155 cmd: "$(location stats-log-api-gen) --java $(out) --module wifi " +
Muhammad Qureshi97e64f22021-01-08 00:56:16 -0800156 " --javaPackage com.android.server.wifi.proto --javaClass WifiStatsLog" +
157 " --minApiLevel 30",
Roshan Pius91cd4d82019-12-06 14:29:48 -0800158 out: ["com/android/server/wifi/proto/WifiStatsLog.java"],
159}
160
Roshan Piusae6a9e82020-02-20 07:48:44 -0800161// Prebuilt for the wifi.rc file.
162prebuilt_etc {
163 name: "wifi.rc",
164 src: "wifi.rc",
165 sub_dir: "init"
Inseob Kim81b0cc32020-01-15 22:58:50 +0900166}