• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// Copyright (C) 2019 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: [
19        "packages_modules_Permission_PermissionController_license",
20    ],
21}
22
23// Added automatically by a large-scale-change
24// See: http://go/android-license-faq
25license {
26    name: "packages_modules_Permission_PermissionController_license",
27    visibility: [":__subpackages__"],
28    license_kinds: [
29        "SPDX-license-identifier-Apache-2.0",
30    ],
31    license_text: [
32        "NOTICE",
33    ],
34}
35
36genrule {
37    name: "statslog-permissioncontroller-java-gen",
38    tools: ["stats-log-api-gen"],
39    cmd: "$(location stats-log-api-gen) --java $(out) --module permissioncontroller" +
40         " --javaPackage com.android.permissioncontroller" +
41         " --javaClass PermissionControllerStatsLog --minApiLevel 29",
42    out: ["com/android/permissioncontroller/PermissionControllerStatsLog.java"],
43}
44
45java_library {
46    name: "permissioncontroller-statsd",
47    sdk_version: "system_current",
48
49    srcs: [
50        ":statslog-permissioncontroller-java-gen",
51    ],
52}
53
54// File to be included by permission controller app an mocking tests
55filegroup {
56    name: "permissioncontroller-sources",
57    srcs: [
58        "src/**/*.java",
59        "src/**/*.kt",
60        ":permissioncontroller-protos",
61    ],
62}
63
64filegroup {
65    name: "permissioncontroller-protos",
66    srcs: [
67        "src/**/*.proto",
68    ],
69}
70
71android_app {
72    name: "PermissionController",
73    // Compiling against "module_current" would allow using non-APIs within the permission APEX
74    // boundaries, which may be unsafe because PermissionController is also shipped as a standalone
75    // artifact. See also b/209458854.
76    sdk_version: "system_current",
77    min_sdk_version: "30",
78    target_sdk_version: "32",
79    updatable: true,
80    privileged: true,
81    certificate: "platform",
82    rename_resources_package: false,
83    required: ["privapp_allowlist_com.android.permissioncontroller.xml"],
84
85    srcs: [":permissioncontroller-sources"],
86
87    libs: [
88        "android.car-stubs",
89        // Soong fails to automatically add this dependency because all the
90        // *.kt sources are inside a filegroup.
91        "kotlin-annotations",
92    ],
93
94    static_libs: [
95        "iconloader",
96        "com.google.android.material_material",
97        "androidx.transition_transition",
98        "androidx-constraintlayout_constraintlayout",
99        "androidx.core_core",
100        "androidx.media_media",
101        "androidx.legacy_legacy-support-core-utils",
102        "androidx.legacy_legacy-support-core-ui",
103        "androidx.fragment_fragment",
104        "androidx.appcompat_appcompat",
105        "androidx.preference_preference",
106        "androidx.recyclerview_recyclerview",
107        "androidx.legacy_legacy-preference-v14",
108        "androidx.leanback_leanback",
109        "androidx.leanback_leanback-preference",
110        "androidx.lifecycle_lifecycle-extensions",
111        "androidx.lifecycle_lifecycle-common-java8",
112        "kotlin-stdlib",
113        "kotlinx-coroutines-android",
114        "androidx.navigation_navigation-common-ktx",
115        "androidx.navigation_navigation-fragment-ktx",
116        "androidx.navigation_navigation-runtime-ktx",
117        "androidx.navigation_navigation-ui-ktx",
118        "SettingsLibHelpUtils",
119        "SettingsLibRestrictedLockUtils",
120        "SettingsLibAppPreference",
121        "SettingsLibSearchWidget",
122        "SettingsLibLayoutPreference",
123        "SettingsLibBarChartPreference",
124        "SettingsLibActionBarShadow",
125        "SettingsLibProgressBar",
126        "SettingsLibCollapsingToolbarBaseActivity",
127        "SettingsLibSettingsTheme",
128        "SettingsLibFooterPreference",
129        "SettingsLibSelectorWithWidgetPreference",
130        "SettingsLibTwoTargetPreference",
131        "androidx.annotation_annotation",
132        "permissioncontroller-statsd",
133        "car-ui-lib",
134        "libprotobuf-java-lite",
135        "SettingsLibUtils",
136        "modules-utils-build_system",
137    ],
138
139    proto: {
140        type: "lite",
141    },
142
143    lint: {
144        strict_updatability_linting: true,
145    },
146
147    optimize: {
148        proguard_flags_files: ["proguard.flags"],
149    },
150
151    plugins: ["java_api_finder"],
152
153    kotlincflags: ["-Xjvm-default=enable"],
154}
155