1// 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
15java_defaults {
16    name: "documentsui_defaults",
17
18    static_libs: [
19        "androidx.appcompat_appcompat",
20        "androidx.legacy_legacy-support-core-ui",
21        "androidx.legacy_legacy-support-v13",
22        "androidx.legacy_legacy-support-v4",
23        "androidx.recyclerview_recyclerview",
24        "androidx.recyclerview_recyclerview-selection",
25        "androidx.transition_transition",
26        "apache-commons-compress",
27        "com.google.android.material_material",
28        "guava",
29    ],
30
31    libs: [
32        "app-compat-annotations",
33    ],
34
35    privileged: true,
36
37    certificate: "platform",
38
39    optimize: {
40        proguard_flags_files: ["proguard.flags"],
41    },
42
43    sdk_version: "system_current",
44    min_sdk_version: "29",
45
46    plugins: [
47        "java_api_finder",
48    ],
49}
50
51platform_compat_config {
52    name: "documents-ui-compat-config",
53    src: ":DocumentsUI",
54}
55
56filegroup {
57    name: "DocumentsUI-srcs",
58    srcs: [
59        "src/**/*.java",
60	":statslog-docsui-java-gen",
61    ],
62}
63
64java_library {
65    name: "docsui-statsd",
66    srcs: [
67        ":statslog-docsui-java-gen",
68    ],
69}
70
71genrule {
72    name: "statslog-docsui-java-gen",
73    tools: ["stats-log-api-gen"],
74    cmd: "$(location stats-log-api-gen) --java $(out) --module docsui --javaPackage com.android.documentsui --javaClass DocumentsStatsLog --supportQ",
75    out: ["com/android/documentsui/DocumentsStatsLog.java"],
76}
77
78android_library {
79    name: "DocumentsUI-res-lib",
80
81    manifest: "AndroidManifest.xml",
82
83    static_libs: [
84        "androidx.appcompat_appcompat",
85        "com.google.android.material_material",
86    ],
87
88    resource_dirs: [
89        "res",
90    ],
91
92    aaptflags: [
93        "--auto-add-overlay",
94    ],
95
96    sdk_version: "system_current",
97    min_sdk_version: "29",
98}
99
100android_library {
101    name: "DocumentsUIUnitTests-res-lib",
102
103    manifest: "AndroidManifestForUnitTests.xml",
104
105    static_libs: [
106        "androidx.appcompat_appcompat",
107        "com.google.android.material_material",
108    ],
109
110    resource_dirs: [
111        "res",
112    ],
113
114    aaptflags: [
115        "--auto-add-overlay",
116    ],
117
118    sdk_version: "system_current",
119    min_sdk_version: "29",
120}
121
122android_app {
123    name: "DocumentsUI",
124
125    defaults: ["documentsui_defaults"],
126
127    manifest: "AndroidManifest.xml",
128
129    srcs: [
130        ":DocumentsUI-srcs",
131    ],
132
133    resource_dirs: [
134        "res",
135    ],
136
137    required: ["privapp_whitelist_com.android.documentsui"],
138
139    min_sdk_version: "29",
140}
141