blob: 88ebebadd4fc97b7fa6e3034832800098cc645d6 [file] [log] [blame]
felkachang864699a2019-01-11 16:28:17 +08001// Copyright (C) 2019 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Bob Badourd851bf12021-02-12 21:33:26 -080015package {
16 default_applicable_licenses: ["packages_apps_DocumentsUI_license"],
17}
18
19// Added automatically by a large-scale-change that took the approach of
20// 'apply every license found to every target'. While this makes sure we respect
21// every license restriction, it may not be entirely correct.
22//
23// e.g. GPL in an MIT project might only apply to the contrib/ directory.
24//
25// Please consider splitting the single license below into multiple licenses,
26// taking care not to lose any license_kind information, and overriding the
27// default license using the 'licenses: [...]' property on targets as needed.
28//
29// For unused files, consider creating a 'fileGroup' with "//visibility:private"
30// to attach the license to, and including a comment whether the files may be
31// used in the current project.
32// See: http://go/android-license-faq
33license {
34 name: "packages_apps_DocumentsUI_license",
35 visibility: [":__subpackages__"],
36 license_kinds: [
37 "SPDX-license-identifier-Apache-2.0",
38 "legacy_unencumbered",
39 ],
40 // large-scale-change unable to identify any license_text files
41}
42
felkachangacf1bd42018-10-08 15:42:19 +080043java_defaults {
44 name: "documentsui_defaults",
45
46 static_libs: [
47 "androidx.appcompat_appcompat",
48 "androidx.legacy_legacy-support-core-ui",
49 "androidx.legacy_legacy-support-v13",
50 "androidx.legacy_legacy-support-v4",
51 "androidx.recyclerview_recyclerview",
52 "androidx.recyclerview_recyclerview-selection",
53 "androidx.transition_transition",
felkachang1556c362018-08-30 16:21:59 +080054 "apache-commons-compress",
felkachangacf1bd42018-10-08 15:42:19 +080055 "com.google.android.material_material",
56 "guava",
57 ],
58
Ivan Chiangf0f7d2e2020-02-27 14:44:07 +080059 libs: [
60 "app-compat-annotations",
61 ],
62
felkachangacf1bd42018-10-08 15:42:19 +080063 privileged: true,
64
65 certificate: "platform",
66
67 optimize: {
68 proguard_flags_files: ["proguard.flags"],
69 },
70
Jeff Sharkeya8032882018-12-12 09:42:26 -070071 sdk_version: "system_current",
Zemiao Zhu6f99d9d2021-01-22 14:25:11 -080072 target_sdk_version: "30",
Nikita Ioffeddc94b42020-03-03 12:05:16 +000073 min_sdk_version: "29",
Kun Niu5d29a012019-07-01 18:06:43 -070074
Ivan Chiangf0f7d2e2020-02-27 14:44:07 +080075 plugins: [
Ivan Chiangf0f7d2e2020-02-27 14:44:07 +080076 "java_api_finder",
77 ],
78}
79
80platform_compat_config {
81 name: "documents-ui-compat-config",
82 src: ":DocumentsUI",
felkachangacf1bd42018-10-08 15:42:19 +080083}
84
Bill Line77ec522019-02-12 19:35:12 +080085filegroup {
86 name: "DocumentsUI-srcs",
87 srcs: [
88 "src/**/*.java",
shawnlina06573a2019-04-09 15:48:43 +080089 ":statslog-docsui-java-gen",
Bill Line77ec522019-02-12 19:35:12 +080090 ],
91}
92
shawnlina06573a2019-04-09 15:48:43 +080093java_library {
94 name: "docsui-statsd",
95 srcs: [
96 ":statslog-docsui-java-gen",
97 ],
98}
99
100genrule {
101 name: "statslog-docsui-java-gen",
102 tools: ["stats-log-api-gen"],
Muhammad Qureshib60afa92020-12-10 10:32:47 -0800103 cmd: "$(location stats-log-api-gen) --java $(out) --module docsui" +
104 " --javaPackage com.android.documentsui --javaClass DocumentsStatsLog --minApiLevel 29",
shawnlina06573a2019-04-09 15:48:43 +0800105 out: ["com/android/documentsui/DocumentsStatsLog.java"],
106}
107
Bill Line77ec522019-02-12 19:35:12 +0800108android_library {
109 name: "DocumentsUI-res-lib",
110
111 manifest: "AndroidManifest.xml",
112
113 static_libs: [
114 "androidx.appcompat_appcompat",
115 "com.google.android.material_material",
116 ],
117
118 resource_dirs: [
119 "res",
120 ],
121
122 aaptflags: [
123 "--auto-add-overlay",
124 ],
Jeff Hamilton1ecca352019-03-06 23:09:40 -0500125
Jeongik Cha6fb887e2019-11-01 15:23:11 +0900126 sdk_version: "system_current",
Zemiao Zhu6f99d9d2021-01-22 14:25:11 -0800127 target_sdk_version: "30",
Nikita Ioffeddc94b42020-03-03 12:05:16 +0000128 min_sdk_version: "29",
Bill Line77ec522019-02-12 19:35:12 +0800129}
130
Diksha Gohlyanef5e4d72020-05-08 09:33:27 -0700131android_library {
Diksha Gohlyanfcbff752020-06-12 08:56:46 -0700132 name: "DocumentsUIUnitTests-res-lib",
Diksha Gohlyanef5e4d72020-05-08 09:33:27 -0700133
134 manifest: "AndroidManifestForUnitTests.xml",
135
136 static_libs: [
137 "androidx.appcompat_appcompat",
138 "com.google.android.material_material",
139 ],
140
141 resource_dirs: [
142 "res",
143 ],
144
145 aaptflags: [
146 "--auto-add-overlay",
147 ],
148
149 sdk_version: "system_current",
Zemiao Zhu6f99d9d2021-01-22 14:25:11 -0800150 target_sdk_version: "30",
Diksha Gohlyanef5e4d72020-05-08 09:33:27 -0700151 min_sdk_version: "29",
152}
153
felkachangacf1bd42018-10-08 15:42:19 +0800154android_app {
felkachangacf1bd42018-10-08 15:42:19 +0800155 name: "DocumentsUI",
156
157 defaults: ["documentsui_defaults"],
158
159 manifest: "AndroidManifest.xml",
160
161 srcs: [
shawnlina06573a2019-04-09 15:48:43 +0800162 ":DocumentsUI-srcs",
felkachangacf1bd42018-10-08 15:42:19 +0800163 ],
164
165 resource_dirs: [
166 "res",
167 ],
Bill Lin24499e62019-05-14 18:15:42 +0800168
169 required: ["privapp_whitelist_com.android.documentsui"],
Nikita Ioffeddc94b42020-03-03 12:05:16 +0000170
Zemiao Zhu6f99d9d2021-01-22 14:25:11 -0800171 target_sdk_version: "30",
Nikita Ioffeddc94b42020-03-03 12:05:16 +0000172 min_sdk_version: "29",
felkachangacf1bd42018-10-08 15:42:19 +0800173}