blob: 100af56fc816256ad4b135e63f8cd36e9db6497d [file] [log] [blame]
// 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
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// See the License for the specific language governing permissions and
// limitations under the License.
java_defaults {
name: "wifi-service-common",
defaults: ["wifi-module-sdk-version-defaults"],
errorprone: {
javacflags: ["-Xep:CheckReturnValue:ERROR"],
product_variables: {
pdk: {
enabled: false,
filegroup {
name: "wifi-service-srcs",
srcs: [
filegroup {
name: "wifi-service-BaseWifiService",
srcs: ["java/com/android/server/wifi/"],
path: "java",
// pre-jarjar version of wifi-service that builds against pre-jarjar version of framework-wifi
java_library {
name: "wifi-service-pre-jarjar",
installable: false,
defaults: ["wifi-service-common"],
srcs: [ ":wifi-service-srcs" ],
// java_api_finder must accompany `srcs`
plugins: ["java_api_finder"],
sdk_version: "system_server_current",
libs: [
// load the resources from the resources APK.
// need pre-jarjar symbols so that wifi-service can reference the original class names at
// compile time
static_libs: [
// 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.
// wifi-service static library
// ============================================================
java_library {
name: "service-wifi",
defaults: ["wifi-service-common"],
installable: true,
static_libs: ["wifi-service-pre-jarjar"],
// need to include `libs` so that Soong doesn't complain about missing classes after jarjaring
libs: [
sdk_version: "system_server_current",
jarjar_rules: ":wifi-jarjar-rules",
optimize: {
enabled: true,
shrink: true,
proguard_flags_files: ["proguard.flags"],
dex_preopt: {
enabled: false,
app_image: false,
visibility: [
apex_available: [
// Statsd auto-generated code
// ============================================================
genrule {
name: "statslog-wifi-java-gen",
tools: ["stats-log-api-gen"],
cmd: "$(location stats-log-api-gen) --java $(out) --module wifi " +
" --javaPackage --javaClass WifiStatsLog",
out: ["com/android/server/wifi/proto/"],
// Prebuilt for the wifi.rc file.
prebuilt_etc {
name: "wifi.rc",
src: "wifi.rc",
sub_dir: "init"