blob: a9eaf87d85ce3661120589fbb8c57e4ca000a506 [file] [log] [blame]
//
// Copyright (C) 2022 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.
//
package {
default_applicable_licenses: [
"packages_modules_DeviceLock_DeviceLockController_license",
],
}
license {
name: "packages_modules_DeviceLock_DeviceLockController_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
],
license_text: [
"NOTICE",
],
}
filegroup {
name: "devicelockcontroller-sources",
srcs: [
"src/**/*.java",
],
exclude_srcs: [
"src/com/android/devicelockcontroller/activities/*.java",
"src/com/android/devicelockcontroller/util/*.java",
],
}
filegroup {
name: "devicelockcontroller-activities-sources",
srcs: [
"src/com/android/devicelockcontroller/activities/*.java",
],
}
filegroup {
name: "devicelockcontroller-util-sources",
srcs: [
"src/com/android/devicelockcontroller/util/*.java",
],
}
filegroup {
name: "devicelockcontroller-aidl",
srcs: [
"src/**/*.aidl",
],
}
android_library {
name: "devicelockcontroller-res-lib",
sdk_version: "module_current",
min_sdk_version: "UpsideDownCake",
resource_dirs: [
"res",
],
static_libs: [
// TODO: Check if we have an alternate for this
"com.google.android.material_material",
],
apex_available: [
"com.android.devicelock",
],
manifest: "AndroidManifest.xml",
visibility: [
"//packages/modules/DeviceLock:__subpackages__",
],
}
java_library {
name: "devicelockcontroller-util-lib",
srcs: [":devicelockcontroller-util-sources"],
sdk_version: "module_current",
min_sdk_version: "UpsideDownCake",
apex_available: [
"com.android.devicelock",
],
visibility: [
"//packages/modules/DeviceLock:__subpackages__",
],
}
java_library {
name: "devicelockcontroller-activities-lib",
srcs: [":devicelockcontroller-activities-sources"],
sdk_version: "module_current",
min_sdk_version: "UpsideDownCake",
static_libs: [
"androidx.appcompat_appcompat",
"devicelockcontroller-res-lib",
"devicelockcontroller-util-lib",
],
apex_available: [
"com.android.devicelock",
],
visibility: [
"//packages/modules/DeviceLock:__subpackages__",
],
}
java_library {
name: "devicelockcontroller-interface",
sdk_version: "module_current",
min_sdk_version: "33", // AIDL compiler does not know about UpsideDownCake
srcs: [":devicelockcontroller-aidl"],
apex_available: [
"com.android.devicelock",
],
visibility: [
"//packages/modules/DeviceLock:__subpackages__",
],
}
java_library {
name: "devicelockcontroller-grpclib",
sdk_version: "module_current",
min_sdk_version: "UpsideDownCake",
apex_available: ["com.android.devicelock"],
static_libs: [
"grpc-java-core-android",
"grpc-java-okhttp-client-lite",
"libprotobuf-java-lite",
"opencensus-java-api",
"opencensus-java-contrib-grpc-metrics",
],
}
android_app {
name: "DeviceLockController",
sdk_version: "module_current",
min_sdk_version: "UpsideDownCake",
updatable: true,
privileged: true,
certificate: "platform",
rename_resources_package: false,
required: ["privapp_allowlist_com.android.devicelockcontroller.xml"],
srcs: [":devicelockcontroller-sources"],
static_libs: [
"androidx.annotation_annotation",
"androidx.collection_collection",
"androidx.lifecycle_lifecycle-extensions",
"androidx.work_work-runtime",
"devicelockcontroller-activities-lib",
"devicelockcontroller-grpclib",
"devicelockcontroller-grpc-lite",
"devicelockcontroller-interface",
"devicelockcontroller-res-lib",
"devicelockcontroller-util-lib",
"guava",
"firebase-encoders-jar",
"firebase-common-aar",
"firebase-components-aar",
"firebase-iid-aar",
"firebase-iid-interop-aar",
"firebase-installations-aar",
"firebase-installations-interop-aar",
"firebase-messaging-aar",
"firebase-measurement-connector-aar",
"firebase-encoders-json-aar",
"firebase-datatransport-aar",
"play-services-basement-aar",
"play-services-cloud-messaging-aar",
"play-services-stats-aar",
"play-services-tasks-aar",
"transport-api-aar",
"transport-backend-cct-aar",
"transport-runtime-aar",
"jsr330",
"dagger2",
],
libs: [
"framework-tethering",
],
lint: {
strict_updatability_linting: true,
},
optimize: {
proguard_flags_files: ["proguard.flags"],
shrink_resources: true,
},
apex_available: [
"//apex_available:platform",
"com.android.devicelock",
],
}