196 lines
5.4 KiB
Plaintext
196 lines
5.4 KiB
Plaintext
//
|
|
// 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-grpc-impl-sources",
|
|
srcs: [
|
|
"src/com/android/devicelockcontroller/provision/grpc/impl/*.java",
|
|
],
|
|
}
|
|
|
|
java_library {
|
|
name: "devicelockcontroller-interface",
|
|
sdk_version: "module_current",
|
|
min_sdk_version: "33", // AIDL compiler does not know about UpsideDownCake
|
|
srcs: ["src/**/*.aidl"],
|
|
apex_available: [
|
|
"com.android.devicelock",
|
|
],
|
|
visibility: [
|
|
"//packages/modules/DeviceLock:__subpackages__",
|
|
],
|
|
}
|
|
|
|
java_library {
|
|
name: "devicelockcontroller-common-lib",
|
|
srcs: [
|
|
"src/com/android/devicelockcontroller/common/*.java",
|
|
"src/com/android/devicelockcontroller/util/*.java",
|
|
],
|
|
sdk_version: "module_current",
|
|
min_sdk_version: "UpsideDownCake",
|
|
apex_available: ["com.android.devicelock"],
|
|
static_libs: [
|
|
"androidx.annotation_annotation",
|
|
],
|
|
visibility: [
|
|
"//packages/modules/DeviceLock:__subpackages__",
|
|
],
|
|
}
|
|
|
|
java_library {
|
|
name: "devicelockcontroller-grpc-interface-lib",
|
|
srcs: ["src/com/android/devicelockcontroller/provision/grpc/*.java"],
|
|
sdk_version: "module_current",
|
|
min_sdk_version: "UpsideDownCake",
|
|
apex_available: ["com.android.devicelock"],
|
|
static_libs: [
|
|
"devicelockcontroller-common-lib",
|
|
"androidx.annotation_annotation",
|
|
"grpc-java-core-android",
|
|
"grpc-java-okhttp-client-lite",
|
|
"libprotobuf-java-lite",
|
|
"opencensus-java-api",
|
|
"opencensus-java-contrib-grpc-metrics",
|
|
],
|
|
visibility: [
|
|
"//packages/modules/DeviceLock:__subpackages__",
|
|
"//vendor:__subpackages__",
|
|
],
|
|
}
|
|
|
|
// Library with all dependencies for building DeviceLockController
|
|
android_library {
|
|
name: "devicelockcontroller-lib",
|
|
sdk_version: "module_current",
|
|
min_sdk_version: "UpsideDownCake",
|
|
srcs: ["src/**/*.java"],
|
|
exclude_srcs: [":devicelockcontroller-grpc-impl-sources"],
|
|
resource_dirs: ["res"],
|
|
libs: [
|
|
"framework-annotations-lib",
|
|
"framework-devicelock.impl",
|
|
"org.apache.http.legacy",
|
|
],
|
|
static_libs: [
|
|
"androidx.annotation_annotation",
|
|
"androidx.collection_collection",
|
|
"androidx.lifecycle_lifecycle-extensions",
|
|
"androidx.preference_preference",
|
|
"androidx.work_work-runtime",
|
|
"devicelockcontroller-grpc-interface-lib",
|
|
"devicelockcontroller-interface",
|
|
// TODO: Check if we have an alternate for this
|
|
"com.google.android.material_material",
|
|
"guava",
|
|
"jsr330",
|
|
"dagger2",
|
|
"SettingsLibCollapsingToolbarBaseActivity",
|
|
"SettingsLibTopIntroPreference",
|
|
],
|
|
manifest: "AndroidManifestBase.xml",
|
|
apex_available: [
|
|
"com.android.devicelock",
|
|
],
|
|
visibility: [
|
|
"//packages/modules/DeviceLock:__subpackages__",
|
|
"//vendor:__subpackages__",
|
|
],
|
|
}
|
|
|
|
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-grpc-impl-sources"],
|
|
|
|
static_libs: [
|
|
"devicelockcontroller-lib",
|
|
"devicelockcontroller-grpc-interface-lib",
|
|
"devicelockcontroller-proto-lite",
|
|
],
|
|
|
|
lint: {
|
|
strict_updatability_linting: true,
|
|
},
|
|
|
|
optimize: {
|
|
proguard_flags_files: ["proguard.flags"],
|
|
shrink_resources: true,
|
|
},
|
|
|
|
apex_available: [
|
|
"//apex_available:platform",
|
|
"com.android.devicelock",
|
|
],
|
|
}
|
|
|
|
android_app {
|
|
name: "DeviceLockControllerDebug",
|
|
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-grpc-impl-sources"],
|
|
|
|
static_libs: [
|
|
"devicelockcontroller-debug-lib",
|
|
"devicelockcontroller-grpc-interface-lib",
|
|
"devicelockcontroller-proto-lite",
|
|
],
|
|
|
|
lint: {
|
|
strict_updatability_linting: true,
|
|
},
|
|
|
|
optimize: {
|
|
proguard_flags_files: ["proguard.flags"],
|
|
shrink_resources: true,
|
|
},
|
|
|
|
apex_available: [
|
|
"//apex_available:platform",
|
|
"com.android.devicelock",
|
|
],
|
|
}
|