1/*
2 * Copyright (C) 2021 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 */
16
17package {
18    default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
21java_library {
22    name: "managedprovisioning_protoslite",
23    srcs: ["proto/**/*.proto"],
24    proto: {
25        type: "lite",
26    },
27}
28
29aconfig_declarations {
30    name: "aconfig_managed_provisioning_flags",
31    package: "com.android.managedprovisioning.flags",
32    container: "system",
33    srcs: [
34        "aconfig/*.aconfig",
35    ],
36}
37
38java_aconfig_library {
39    name: "aconfig_managed_provisioning_flags_lib",
40    aconfig_declarations: "aconfig_managed_provisioning_flags",
41}
42
43android_library {
44    name: "ManagedProvisioningLib",
45    manifest: "AndroidManifest.xml",
46
47    libs: [
48        "auto_value_annotations",
49    ],
50
51    static_libs: [
52        "androidx.legacy_legacy-support-v4",
53        "androidx.annotation_annotation",
54        "setupdesign",
55        "managedprovisioning_protoslite",
56        "androidx.webkit_webkit",
57        "setupdesign-lottie-loading-layout",
58        "lottie",
59        "guava",
60        "aconfig_managed_provisioning_flags_lib",
61        "device_policy_aconfig_flags_lib",
62        "hilt_android",
63        "android_onboarding.contracts.provisioning",
64        "android_onboarding.contracts.annotations",
65        "android_onboarding.contracts.setupwizard",
66        "android_onboarding.flags_hilt",
67        "jsr330",
68    ],
69
70    plugins: ["auto_value_plugin"],
71
72    srcs: [
73        "src/**/*.java",
74        "src/**/*.kt",
75        "src/**/I*.aidl",
76    ],
77
78    resource_dirs: ["res"],
79
80    optimize: {
81        proguard_flags_files: ["proguard.flags"],
82    },
83}
84
85android_app {
86    name: "ManagedProvisioning",
87
88    static_libs: ["ManagedProvisioningLib"],
89
90    resource_dirs: [],
91
92    platform_apis: true,
93    certificate: "platform",
94    privileged: true,
95    optimize: {
96        shrink_resources: true,
97        proguard_compatibility: false,
98        proguard_flags_files: ["proguard.flags"],
99    },
100
101    // Packages to be included in code coverage runs. This does not affect production builds.
102    jacoco: {
103        include_filter: ["com.android.managedprovisioning.*"],
104    },
105}
106