1// 2// Copyright (C) 2018 The Android Open Source Project 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. 15// 16package { 17 default_team: "trendy_team_fwk_wifi_hal", 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21java_defaults { 22 name: "wifi-service-common", 23 defaults: ["wifi-module-sdk-version-defaults"], 24 errorprone: { 25 javacflags: ["-Xep:CheckReturnValue:ERROR"], 26 }, 27} 28 29filegroup { 30 name: "wifi-service-srcs", 31 srcs: [ 32 "java/**/*.java", 33 "java/**/*.logtags", 34 ":framework-wifi-service-shared-srcs", 35 ":net-utils-wifi-service-common-srcs", 36 ":statslog-wifi-java-gen", 37 ":coex-table-parser", 38 ], 39} 40 41// pre-jarjar version of wifi-service that builds against pre-jarjar version of framework-wifi 42java_library { 43 name: "wifi-service-pre-jarjar", 44 installable: false, 45 defaults: ["wifi-service-common"], 46 srcs: [":wifi-service-srcs"], 47 48 sdk_version: "system_server_current", 49 lint: { 50 baseline_filename: "lint-baseline.xml", 51 }, 52 libs: [ 53 "androidx.annotation_annotation", 54 "error_prone_annotations", 55 "jsr305", 56 "framework-annotations-lib", 57 // load the resources from the resources APK. 58 "ServiceWifiResources", 59 // need pre-jarjar symbols so that wifi-service can reference the original class names at 60 // compile time 61 "framework-wifi-pre-jarjar", 62 "framework-bluetooth", 63 "framework-configinfrastructure", 64 "framework-connectivity.stubs.module_lib", 65 "framework-connectivity-t.stubs.module_lib", 66 "framework-location.stubs.module_lib", 67 "framework-statsd.stubs.module_lib", 68 "framework-tethering.stubs.module_lib", 69 "unsupportedappusage", 70 "app-compat-annotations", 71 "auto_value_annotations", 72 ], 73 74 plugins: [ 75 "auto_value_plugin", 76 ], 77 78 static_libs: [ 79 // Types-only package shared across the HALs 80 "android.hardware.wifi.common-V1-java", 81 // AIDL vendor hal implementation 82 "android.hardware.wifi-V2-java", 83 // HIDL vendor hal implementation 84 "android.hardware.wifi-V1.0-java", 85 "android.hardware.wifi-V1.1-java", 86 "android.hardware.wifi-V1.2-java", 87 "android.hardware.wifi-V1.3-java", 88 "android.hardware.wifi-V1.4-java", 89 "android.hardware.wifi-V1.5-java", 90 "android.hardware.wifi-V1.6-java", 91 // AIDL hostapd implementation 92 "android.hardware.wifi.hostapd-V2-java", 93 // HIDL hostapd implementation 94 "android.hardware.wifi.hostapd-V1.0-java", 95 "android.hardware.wifi.hostapd-V1.1-java", 96 "android.hardware.wifi.hostapd-V1.2-java", 97 "android.hardware.wifi.hostapd-V1.3-java", 98 // AIDL supplicant implementation 99 "android.hardware.wifi.supplicant-V3-java", 100 // HIDL supplicant implementation 101 "android.hardware.wifi.supplicant-V1.0-java", 102 "android.hardware.wifi.supplicant-V1.1-java", 103 "android.hardware.wifi.supplicant-V1.2-java", 104 "android.hardware.wifi.supplicant-V1.3-java", 105 "android.hardware.wifi.supplicant-V1.4-java", 106 "android.hidl.manager-V1.2-java", 107 "bouncycastle-unbundled", 108 "ksoap2", 109 // Note: libprotobuf-java-lite uses a few core platform APIs which 110 // does show up as @hide API usage. But, this can be safely ignored 111 // since the library uses reflection to ensure that the OS does provide 112 // the necessary core platform APIs. 113 "libprotobuf-java-lite", 114 "libnanohttpd", 115 "modules-utils-backgroundthread", 116 "modules-utils-fastxmlserializer", 117 "modules-utils-locallog", 118 "netd-client", 119 "networkstack-client", 120 "net-utils-services-common", 121 "service-entitlement", 122 "wifi-lite-protos", 123 "wifi-nano-protos", 124 "android.net.wifi.flags-aconfig-java", 125 ], 126 apex_available: ["com.android.wifi"], 127} 128 129// wifi-service static library 130// ============================================================ 131java_library { 132 name: "service-wifi", 133 defaults: [ 134 "wifi-service-common", 135 "standalone-system-server-module-optimize-defaults", 136 ], 137 installable: true, 138 static_libs: ["wifi-service-pre-jarjar"], 139 140 // need to include `libs` so that Soong doesn't complain about missing classes after jarjaring 141 libs: [ 142 "framework-wifi.impl", 143 "auto_value_annotations", 144 ], 145 146 plugins: [ 147 "auto_value_plugin", 148 ], 149 150 sdk_version: "system_server_current", 151 152 jarjar_rules: ":wifi-jarjar-rules", 153 154 visibility: [ 155 "//frameworks/opt/net/wifi/service/apex", 156 "//frameworks/opt/net/wifi/tests/wifitests/apex", 157 "//packages/modules/Wifi/apex", 158 "//packages/modules/Wifi/service/tests/wifitests/apex", 159 ], 160 apex_available: [ 161 "com.android.wifi", 162 "test_com.android.wifi", 163 ], 164} 165 166// Statsd auto-generated code 167// ============================================================ 168genrule { 169 name: "statslog-wifi-java-gen", 170 tools: ["stats-log-api-gen"], 171 cmd: "$(location stats-log-api-gen) --java $(out) --module wifi " + 172 " --javaPackage com.android.server.wifi.proto --javaClass WifiStatsLog" + 173 " --minApiLevel 30", 174 out: ["com/android/server/wifi/proto/WifiStatsLog.java"], 175} 176 177// Prebuilt for the wifi.rc file. 178prebuilt_etc { 179 name: "wifi.rc", 180 src: "wifi.rc", 181 sub_dir: "init", 182} 183