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