Roshan Pius | 09d08e6 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2018 The Android Open Source Project |
Dan Willemsen | f877fb1 | 2018-11-16 16:48:19 -0800 | [diff] [blame] | 3 | // |
| 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 Pius | 09d08e6 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 15 | // |
Bob Badour | c446a52 | 2021-02-04 00:08:31 -0800 | [diff] [blame] | 16 | package { |
| 17 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 18 | } |
| 19 | |
Roshan Pius | 09d08e6 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 20 | java_defaults { |
Roshan Pius | 3b8fabe | 2019-11-25 07:35:34 -0800 | [diff] [blame] | 21 | name: "wifi-service-common", |
David Su | d2a7db5 | 2020-06-10 12:35:48 -0700 | [diff] [blame] | 22 | defaults: ["wifi-module-sdk-version-defaults"], |
Roshan Pius | 09d08e6 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 23 | errorprone: { |
| 24 | javacflags: ["-Xep:CheckReturnValue:ERROR"], |
| 25 | }, |
| 26 | product_variables: { |
| 27 | pdk: { |
| 28 | enabled: false, |
| 29 | }, |
| 30 | }, |
Roshan Pius | 09d08e6 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 31 | } |
Dan Willemsen | f877fb1 | 2018-11-16 16:48:19 -0800 | [diff] [blame] | 32 | |
Roshan Pius | 3b8fabe | 2019-11-25 07:35:34 -0800 | [diff] [blame] | 33 | filegroup { |
| 34 | name: "wifi-service-srcs", |
Roshan Pius | 09d08e6 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 35 | srcs: [ |
Roshan Pius | 09d08e6 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 36 | "java/**/*.java", |
Roshan Pius | 09d08e6 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 37 | "java/**/*.logtags", |
Roshan Pius | a924b28 | 2019-12-06 13:51:16 -0800 | [diff] [blame] | 38 | ":framework-wifi-service-shared-srcs", |
Roshan Pius | dcc71be | 2020-01-16 09:18:52 -0800 | [diff] [blame] | 39 | ":net-utils-wifi-service-common-srcs", |
Roshan Pius | 91cd4d8 | 2019-12-06 14:29:48 -0800 | [diff] [blame] | 40 | ":statslog-wifi-java-gen", |
Quang Luong | 453e2ca | 2020-10-14 14:14:46 -0700 | [diff] [blame] | 41 | ":coex-table-parser", |
Roshan Pius | 09d08e6 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 42 | ], |
Roshan Pius | 3b8fabe | 2019-11-25 07:35:34 -0800 | [diff] [blame] | 43 | } |
| 44 | |
David Su | 11ecb03 | 2020-02-05 18:13:55 -0800 | [diff] [blame] | 45 | filegroup { |
| 46 | name: "wifi-service-BaseWifiService", |
| 47 | srcs: ["java/com/android/server/wifi/BaseWifiService.java"], |
| 48 | path: "java", |
| 49 | } |
| 50 | |
David Su | a481276 | 2020-01-09 13:55:21 -0800 | [diff] [blame] | 51 | // pre-jarjar version of wifi-service that builds against pre-jarjar version of framework-wifi |
Roshan Pius | 3b8fabe | 2019-11-25 07:35:34 -0800 | [diff] [blame] | 52 | java_library { |
David Su | a481276 | 2020-01-09 13:55:21 -0800 | [diff] [blame] | 53 | name: "wifi-service-pre-jarjar", |
| 54 | installable: false, |
Roshan Pius | 3b8fabe | 2019-11-25 07:35:34 -0800 | [diff] [blame] | 55 | defaults: ["wifi-service-common"], |
| 56 | srcs: [ ":wifi-service-srcs" ], |
David Su | 227f5c4 | 2020-01-21 16:49:05 -0800 | [diff] [blame] | 57 | // java_api_finder must accompany `srcs` |
| 58 | plugins: ["java_api_finder"], |
Roshan Pius | 09d08e6 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 59 | |
David Su | c014875 | 2020-03-16 15:59:56 -0700 | [diff] [blame] | 60 | sdk_version: "system_server_current", |
Pedro Loureiro | d9f73f0 | 2021-02-25 15:32:11 +0000 | [diff] [blame] | 61 | lint: { |
Nate Jiang | 703ff6e | 2021-07-08 17:07:55 -0700 | [diff] [blame] | 62 | baseline_filename: "lint-baseline-pre-jarjar.xml", |
| 63 | strict_updatability_linting: true, |
Pedro Loureiro | d9f73f0 | 2021-02-25 15:32:11 +0000 | [diff] [blame] | 64 | }, |
Roshan Pius | 09d08e6 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 65 | libs: [ |
David Su | 8797c4d | 2019-08-28 11:17:41 -0700 | [diff] [blame] | 66 | "error_prone_annotations", |
David Su | 8797c4d | 2019-08-28 11:17:41 -0700 | [diff] [blame] | 67 | "jsr305", |
Roshan Pius | 07484ed | 2020-01-17 15:20:53 -0800 | [diff] [blame] | 68 | "framework-annotations-lib", |
David Su | be81267 | 2019-12-17 17:27:47 -0800 | [diff] [blame] | 69 | // load the resources from the resources APK. |
David Su | a72d9e3 | 2020-03-24 19:11:35 -0700 | [diff] [blame] | 70 | "ServiceWifiResources", |
David Su | a481276 | 2020-01-09 13:55:21 -0800 | [diff] [blame] | 71 | // 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 VAN | 37237ba | 2021-01-14 16:44:22 +0900 | [diff] [blame] | 74 | "framework-connectivity.stubs.module_lib", |
Paul Duffin | 7479339 | 2020-05-31 11:53:23 +0100 | [diff] [blame] | 75 | "framework-statsd.stubs.module_lib", |
Jimmy Chen | 7e07c1e | 2020-06-10 16:37:08 +0800 | [diff] [blame] | 76 | "framework-tethering.stubs.module_lib", |
Roshan Pius | 4b22e3e | 2020-01-17 13:45:29 -0800 | [diff] [blame] | 77 | "unsupportedappusage", |
Roshan Pius | 09d08e6 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 78 | ], |
| 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 ElArabawy | b031317 | 2019-07-23 15:33:54 -0700 | [diff] [blame] | 85 | "android.hardware.wifi-V1.4-java", |
Jimmy Chen | 361a864 | 2020-07-15 11:06:21 +0800 | [diff] [blame] | 86 | "android.hardware.wifi-V1.5-java", |
Roshan Pius | 09d08e6 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 87 | "android.hardware.wifi.hostapd-V1.0-java", |
| 88 | "android.hardware.wifi.hostapd-V1.1-java", |
Ahmed ElArabawy | 4debf87 | 2019-12-06 21:12:51 -0800 | [diff] [blame] | 89 | "android.hardware.wifi.hostapd-V1.2-java", |
lesl | 6ff62e4 | 2020-08-03 14:42:59 +0800 | [diff] [blame] | 90 | "android.hardware.wifi.hostapd-V1.3-java", |
Roshan Pius | 09d08e6 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 91 | "android.hardware.wifi.supplicant-V1.0-java", |
| 92 | "android.hardware.wifi.supplicant-V1.1-java", |
| 93 | "android.hardware.wifi.supplicant-V1.2-java", |
Jimmy Chen | 8fa928f | 2019-07-04 16:49:38 +0800 | [diff] [blame] | 94 | "android.hardware.wifi.supplicant-V1.3-java", |
Jimmy Chen | 0a44952 | 2020-08-05 11:07:05 +0800 | [diff] [blame] | 95 | "android.hardware.wifi.supplicant-V1.4-java", |
Roshan Pius | 09d08e6 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 96 | "android.hidl.manager-V1.2-java", |
David Su | 8797c4d | 2019-08-28 11:17:41 -0700 | [diff] [blame] | 97 | "androidx.annotation_annotation", |
Roshan Pius | 40e39ba | 2019-10-23 16:14:07 -0700 | [diff] [blame] | 98 | "bouncycastle-unbundled", |
Roshan Pius | 09d08e6 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 99 | "ksoap2", |
David Su | be81267 | 2019-12-17 17:27:47 -0800 | [diff] [blame] | 100 | // 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 Pius | 29d01bd | 2019-11-05 12:37:59 -0800 | [diff] [blame] | 104 | "libprotobuf-java-lite", |
Roshan Pius | 09d08e6 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 105 | "libnanohttpd", |
Roshan Pius | e012584 | 2020-02-21 07:39:09 -0800 | [diff] [blame] | 106 | "services.net-module-wifi", |
David Su | 8212e97 | 2020-01-12 15:37:50 -0800 | [diff] [blame] | 107 | "wifi-lite-protos", |
Chiachang Wang | 6e2e485 | 2020-11-02 15:39:46 +0800 | [diff] [blame] | 108 | "wifi-nano-protos", |
Roshan Pius | 09d08e6 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 109 | ], |
David Su | a481276 | 2020-01-09 13:55:21 -0800 | [diff] [blame] | 110 | } |
| 111 | |
| 112 | // wifi-service static library |
| 113 | // ============================================================ |
| 114 | java_library { |
Roshan Pius | b8d7fab | 2020-03-23 10:02:09 -0700 | [diff] [blame] | 115 | name: "service-wifi", |
David Su | a481276 | 2020-01-09 13:55:21 -0800 | [diff] [blame] | 116 | 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 Duffin | e390108 | 2020-05-17 20:27:33 +0100 | [diff] [blame] | 122 | "framework-wifi.impl", |
David Su | a481276 | 2020-01-09 13:55:21 -0800 | [diff] [blame] | 123 | ], |
| 124 | |
David Su | c014875 | 2020-03-16 15:59:56 -0700 | [diff] [blame] | 125 | sdk_version: "system_server_current", |
Roshan Pius | 2629709 | 2019-08-27 12:31:09 -0700 | [diff] [blame] | 126 | |
David Su | a481276 | 2020-01-09 13:55:21 -0800 | [diff] [blame] | 127 | jarjar_rules: ":wifi-jarjar-rules", |
Roshan Pius | 3b8fabe | 2019-11-25 07:35:34 -0800 | [diff] [blame] | 128 | 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 Park | 2a77bfd | 2020-01-06 13:34:00 +0900 | [diff] [blame] | 138 | visibility: [ |
| 139 | "//frameworks/opt/net/wifi/service/apex", |
| 140 | "//frameworks/opt/net/wifi/tests/wifitests/apex", |
Baligh Uddin | bb5274a | 2020-12-24 06:01:25 +0000 | [diff] [blame] | 141 | "//packages/modules/Wifi/apex", |
| 142 | "//packages/modules/Wifi/service/tests/wifitests/apex", |
Jiyong Park | 2a77bfd | 2020-01-06 13:34:00 +0900 | [diff] [blame] | 143 | ], |
| 144 | apex_available: [ |
| 145 | "com.android.wifi", |
| 146 | "test_com.android.wifi", |
| 147 | ], |
Roshan Pius | 09d08e6 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 148 | } |
Roshan Pius | 3b8fabe | 2019-11-25 07:35:34 -0800 | [diff] [blame] | 149 | |
Muhammad Qureshi | c9efc27 | 2020-01-17 14:16:58 -0800 | [diff] [blame] | 150 | // Statsd auto-generated code |
Roshan Pius | 91cd4d8 | 2019-12-06 14:29:48 -0800 | [diff] [blame] | 151 | // ============================================================ |
| 152 | genrule { |
| 153 | name: "statslog-wifi-java-gen", |
| 154 | tools: ["stats-log-api-gen"], |
| 155 | cmd: "$(location stats-log-api-gen) --java $(out) --module wifi " + |
Muhammad Qureshi | 97e64f2 | 2021-01-08 00:56:16 -0800 | [diff] [blame] | 156 | " --javaPackage com.android.server.wifi.proto --javaClass WifiStatsLog" + |
| 157 | " --minApiLevel 30", |
Roshan Pius | 91cd4d8 | 2019-12-06 14:29:48 -0800 | [diff] [blame] | 158 | out: ["com/android/server/wifi/proto/WifiStatsLog.java"], |
| 159 | } |
| 160 | |
Roshan Pius | ae6a9e8 | 2020-02-20 07:48:44 -0800 | [diff] [blame] | 161 | // Prebuilt for the wifi.rc file. |
| 162 | prebuilt_etc { |
| 163 | name: "wifi.rc", |
| 164 | src: "wifi.rc", |
| 165 | sub_dir: "init" |
Inseob Kim | 81b0cc3 | 2020-01-15 22:58:50 +0900 | [diff] [blame] | 166 | } |