Roshan Pius | fa48658 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2018 The Android Open Source Project |
Dan Willemsen | cccec94 | 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 | fa48658 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 15 | // |
| 16 | java_defaults { |
Roshan Pius | 7cede7a | 2019-11-25 07:35:34 -0800 | [diff] [blame] | 17 | name: "wifi-service-common", |
Roshan Pius | fa48658 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 18 | min_sdk_version: "29", |
Roshan Pius | fa48658 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 19 | errorprone: { |
| 20 | javacflags: ["-Xep:CheckReturnValue:ERROR"], |
| 21 | }, |
| 22 | product_variables: { |
| 23 | pdk: { |
| 24 | enabled: false, |
| 25 | }, |
| 26 | }, |
Roshan Pius | fa48658 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 27 | } |
Dan Willemsen | cccec94 | 2018-11-16 16:48:19 -0800 | [diff] [blame] | 28 | |
Roshan Pius | 7cede7a | 2019-11-25 07:35:34 -0800 | [diff] [blame] | 29 | filegroup { |
| 30 | name: "wifi-service-srcs", |
Roshan Pius | fa48658 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 31 | srcs: [ |
Roshan Pius | fa48658 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 32 | "java/**/*.java", |
Roshan Pius | fa48658 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 33 | "java/**/*.logtags", |
Roshan Pius | 8ab6de2 | 2019-12-06 13:51:16 -0800 | [diff] [blame] | 34 | ":framework-wifi-service-shared-srcs", |
Roshan Pius | 3027cec | 2020-01-16 09:18:52 -0800 | [diff] [blame] | 35 | ":net-utils-wifi-service-common-srcs", |
Roshan Pius | c126b1d | 2019-12-06 14:29:48 -0800 | [diff] [blame] | 36 | ":statslog-wifi-java-gen", |
Roshan Pius | fa48658 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 37 | ], |
Roshan Pius | 7cede7a | 2019-11-25 07:35:34 -0800 | [diff] [blame] | 38 | } |
| 39 | |
David Su | 9c2ef55 | 2020-01-09 13:55:21 -0800 | [diff] [blame] | 40 | // pre-jarjar version of wifi-service that builds against pre-jarjar version of framework-wifi |
Roshan Pius | 7cede7a | 2019-11-25 07:35:34 -0800 | [diff] [blame] | 41 | java_library { |
David Su | 9c2ef55 | 2020-01-09 13:55:21 -0800 | [diff] [blame] | 42 | name: "wifi-service-pre-jarjar", |
| 43 | installable: false, |
Roshan Pius | 7cede7a | 2019-11-25 07:35:34 -0800 | [diff] [blame] | 44 | defaults: ["wifi-service-common"], |
| 45 | srcs: [ ":wifi-service-srcs" ], |
David Su | d39f7e8 | 2020-01-21 16:49:05 -0800 | [diff] [blame] | 46 | // java_api_finder must accompany `srcs` |
| 47 | plugins: ["java_api_finder"], |
Roshan Pius | fa48658 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 48 | |
David Su | c5adc90 | 2019-12-17 17:27:47 -0800 | [diff] [blame] | 49 | // TODO(b/140299412) should be "core_current" since Wifi module is not allowed to use |
| 50 | // @CorePlatformApi's |
| 51 | sdk_version: "core_platform", |
Roshan Pius | fa48658 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 52 | libs: [ |
David Su | 35efbb5 | 2019-08-28 11:17:41 -0700 | [diff] [blame] | 53 | "error_prone_annotations", |
David Su | 35efbb5 | 2019-08-28 11:17:41 -0700 | [diff] [blame] | 54 | "jsr305", |
Roshan Pius | 3926438 | 2020-01-17 15:20:53 -0800 | [diff] [blame] | 55 | "framework-annotations-lib", |
Roshan Pius | 723fc24 | 2020-01-17 13:45:29 -0800 | [diff] [blame] | 56 | "services-stubs", |
David Su | c5adc90 | 2019-12-17 17:27:47 -0800 | [diff] [blame] | 57 | // load the resources from the resources APK. |
| 58 | "wifi-service-resources", |
David Su | 9c2ef55 | 2020-01-09 13:55:21 -0800 | [diff] [blame] | 59 | // need pre-jarjar symbols so that wifi-service can reference the original class names at |
| 60 | // compile time |
| 61 | "framework-wifi-pre-jarjar", |
Anton Hansson | eb82362 | 2020-01-30 12:08:34 +0000 | [diff] [blame] | 62 | "android_module_lib_stubs_current", |
Muhammad Qureshi | ef50e70 | 2020-01-17 14:16:58 -0800 | [diff] [blame^] | 63 | // TODO(b/146167933): Use framework-statsd-stubs instead. |
| 64 | "framework-statsd", |
Roshan Pius | 723fc24 | 2020-01-17 13:45:29 -0800 | [diff] [blame] | 65 | "unsupportedappusage", |
Roshan Pius | fa48658 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 66 | ], |
| 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 ElArabawy | 8215574 | 2019-07-23 15:33:54 -0700 | [diff] [blame] | 73 | "android.hardware.wifi-V1.4-java", |
Roshan Pius | fa48658 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 74 | "android.hardware.wifi.hostapd-V1.0-java", |
| 75 | "android.hardware.wifi.hostapd-V1.1-java", |
Ahmed ElArabawy | b2c4bd2 | 2019-12-06 21:12:51 -0800 | [diff] [blame] | 76 | "android.hardware.wifi.hostapd-V1.2-java", |
Roshan Pius | fa48658 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 77 | "android.hardware.wifi.supplicant-V1.0-java", |
| 78 | "android.hardware.wifi.supplicant-V1.1-java", |
| 79 | "android.hardware.wifi.supplicant-V1.2-java", |
Jimmy Chen | fdc0279 | 2019-07-04 16:49:38 +0800 | [diff] [blame] | 80 | "android.hardware.wifi.supplicant-V1.3-java", |
Roshan Pius | fa48658 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 81 | "android.hidl.manager-V1.2-java", |
David Su | 35efbb5 | 2019-08-28 11:17:41 -0700 | [diff] [blame] | 82 | "androidx.annotation_annotation", |
Roshan Pius | 7c970f4 | 2019-10-23 16:14:07 -0700 | [diff] [blame] | 83 | "bouncycastle-unbundled", |
Roshan Pius | fa48658 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 84 | "ksoap2", |
David Su | c5adc90 | 2019-12-17 17:27:47 -0800 | [diff] [blame] | 85 | // 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 Pius | 3ff9fc2 | 2019-11-05 12:37:59 -0800 | [diff] [blame] | 89 | "libprotobuf-java-lite", |
Roshan Pius | fa48658 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 90 | "libnanohttpd", |
Roshan Pius | 520ff1c | 2019-12-09 06:56:15 -0800 | [diff] [blame] | 91 | "netd_aidl_interface-V2-java", |
Roshan Pius | 7cede7a | 2019-11-25 07:35:34 -0800 | [diff] [blame] | 92 | "services.net", |
David Su | 8a392f8 | 2020-01-12 15:37:50 -0800 | [diff] [blame] | 93 | "wifi-lite-protos", |
| 94 | "wifi-nano-protos", |
David Su | c5adc90 | 2019-12-17 17:27:47 -0800 | [diff] [blame] | 95 | "PlatformProperties", |
Roshan Pius | fa48658 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 96 | ], |
David Su | 9c2ef55 | 2020-01-09 13:55:21 -0800 | [diff] [blame] | 97 | } |
| 98 | |
| 99 | // wifi-service static library |
| 100 | // ============================================================ |
| 101 | java_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 Hansson | eb82362 | 2020-01-30 12:08:34 +0000 | [diff] [blame] | 110 | "android_module_lib_stubs_current", |
Roshan Pius | 723fc24 | 2020-01-17 13:45:29 -0800 | [diff] [blame] | 111 | "services-stubs", |
David Su | 9c2ef55 | 2020-01-09 13:55:21 -0800 | [diff] [blame] | 112 | ], |
| 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 Pius | 54584c1 | 2019-08-27 12:31:09 -0700 | [diff] [blame] | 117 | |
| 118 | required: [ |
David Su | 35efbb5 | 2019-08-28 11:17:41 -0700 | [diff] [blame] | 119 | "services", |
David Su | c5adc90 | 2019-12-17 17:27:47 -0800 | [diff] [blame] | 120 | "wifi-service-resources", |
Roshan Pius | 54584c1 | 2019-08-27 12:31:09 -0700 | [diff] [blame] | 121 | ], |
Roshan Pius | fa48658 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 122 | |
David Su | 9c2ef55 | 2020-01-09 13:55:21 -0800 | [diff] [blame] | 123 | jarjar_rules: ":wifi-jarjar-rules", |
Roshan Pius | 7cede7a | 2019-11-25 07:35:34 -0800 | [diff] [blame] | 124 | 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 Kim | b7ae91a | 2020-01-15 22:58:50 +0900 | [diff] [blame] | 134 | init_rc: [":wifi-init-rc"], |
David Su | 7f0d386 | 2020-01-03 14:23:56 -0800 | [diff] [blame] | 135 | |
Jiyong Park | 7ee4eef | 2020-01-06 13:34:00 +0900 | [diff] [blame] | 136 | 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 Pius | fa48658 | 2019-06-11 06:52:01 -0700 | [diff] [blame] | 144 | } |
Roshan Pius | 7cede7a | 2019-11-25 07:35:34 -0800 | [diff] [blame] | 145 | |
Muhammad Qureshi | ef50e70 | 2020-01-17 14:16:58 -0800 | [diff] [blame^] | 146 | // Statsd auto-generated code |
Roshan Pius | c126b1d | 2019-12-06 14:29:48 -0800 | [diff] [blame] | 147 | // ============================================================ |
| 148 | genrule { |
| 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 Pius | 7cede7a | 2019-11-25 07:35:34 -0800 | [diff] [blame] | 156 | // APK to hold all the wifi overlayable resources. |
| 157 | // TODO: This should be signed by a wifi specific certificate. |
| 158 | // ============================================================ |
| 159 | android_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 Kim | b7ae91a | 2020-01-15 22:58:50 +0900 | [diff] [blame] | 170 | |
| 171 | filegroup { |
| 172 | name: "wifi-init-rc", |
| 173 | srcs: ["wifi.rc"], |
| 174 | } |