| // |
| // Copyright (C) 2018 The Android Open Source Project |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| // |
| java_defaults { |
| name: "wifi-service-common", |
| min_sdk_version: "29", |
| errorprone: { |
| javacflags: ["-Xep:CheckReturnValue:ERROR"], |
| }, |
| product_variables: { |
| pdk: { |
| enabled: false, |
| }, |
| }, |
| } |
| |
| // Make the JNI part |
| // ============================================================ |
| cc_library_shared { |
| name: "libwifi-jni", |
| |
| cflags: [ |
| "-Wall", |
| "-Werror", |
| "-Wextra", |
| "-Wno-unused-parameter", |
| "-Wno-unused-function", |
| "-Wunused-variable", |
| "-Winit-self", |
| "-Wwrite-strings", |
| "-Wshadow", |
| ], |
| |
| shared_libs: [ |
| "liblog", |
| "libnativehelper", |
| "libcutils", |
| "libutils", |
| "libdl", |
| ], |
| |
| srcs: [ |
| "jni/com_android_server_wifi_WifiNative.cpp", |
| "jni/jni_helper.cpp", |
| ], |
| |
| product_variables: { |
| pdk: { |
| enabled: false, |
| }, |
| }, |
| } |
| |
| // These filegroups are created for wifi tests. |
| filegroup { |
| name: "wifi-service-jarjar-rules", |
| srcs: [ "jarjar-rules-shared.txt"] |
| } |
| |
| filegroup { |
| name: "wifi-service-srcs", |
| srcs: [ |
| "java/**/*.java", |
| "java/**/*.logtags", |
| ":framework-wifistack-shared-srcs", |
| ], |
| } |
| |
| // wifi-service static library |
| // ============================================================ |
| java_library { |
| name: "wifi-service", |
| installable: true, |
| defaults: ["wifi-service-common"], |
| srcs: [ ":wifi-service-srcs" ], |
| |
| libs: [ |
| "error_prone_annotations", |
| "jsr305", |
| "services", |
| // load the resources from the resources APK. |
| "wifi-service-resources" |
| ], |
| |
| static_libs: [ |
| "android.hardware.wifi-V1.0-java", |
| "android.hardware.wifi-V1.1-java", |
| "android.hardware.wifi-V1.2-java", |
| "android.hardware.wifi-V1.3-java", |
| "android.hardware.wifi-V1.4-java", |
| "android.hardware.wifi.hostapd-V1.0-java", |
| "android.hardware.wifi.hostapd-V1.1-java", |
| "android.hardware.wifi.supplicant-V1.0-java", |
| "android.hardware.wifi.supplicant-V1.1-java", |
| "android.hardware.wifi.supplicant-V1.2-java", |
| "android.hardware.wifi.supplicant-V1.3-java", |
| "android.hidl.manager-V1.2-java", |
| "androidx.annotation_annotation", |
| "bouncycastle-unbundled", |
| "ksoap2", |
| // Note: libprotobuf-java-lite uses a few core platform APIs which |
| // does show up as @hide API usage. But, this can be safely ignored |
| // since the library uses reflection to ensure that the OS does provide |
| // the necessary core platform APIs. |
| "libprotobuf-java-lite", |
| "libnanohttpd", |
| "libwificond_aidl-java", |
| "services.net", |
| "wifi_proto_scorecard", |
| "wifi_proto_metrics", |
| ], |
| |
| required: [ |
| "cacerts_wfa", |
| "libwifi-jni", |
| "services", |
| "wifi-service-resources", |
| ], |
| |
| jarjar_rules: ":wifi-service-jarjar-rules", |
| optimize: { |
| enabled: true, |
| shrink: true, |
| proguard_flags_files: ["proguard.flags"], |
| }, |
| dex_preopt: { |
| enabled: false, |
| app_image: false, |
| }, |
| |
| // TODO: Remove this once all @hide dependencies are resolved. |
| platform_apis: true, |
| |
| init_rc: ["wifi.rc"], |
| } |
| |
| // APK to hold all the wifi overlayable resources. |
| // TODO: This should be signed by a wifi specific certificate. |
| // ============================================================ |
| android_app { |
| name: "wifi-service-resources", |
| defaults: ["wifi-service-common"], |
| resource_dirs: [ |
| "res", |
| ], |
| privileged: true, |
| sdk_version: "system_current", |
| export_package_resources: true, |
| manifest: "AndroidManifest_Resources.xml", |
| } |