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    privileged: true,
32
33    certificate: "platform",
34
35    optimize: {
36        proguard_flags_files: ["proguard.flags"],
37    },
38
39    sdk_version: "system_current",
40    min_sdk_version: "28",
41    target_sdk_version: "28",
42
43    plugins: ["java_api_finder"],
44}
45
46filegroup {
47    name: "DocumentsUI-srcs",
48    srcs: [
49        "src/**/*.java",
50	":statslog-docsui-java-gen",
51    ],
52}
53
54java_library {
55    name: "docsui-statsd",
56    srcs: [
57        ":statslog-docsui-java-gen",
58    ],
59}
60
61genrule {
62    name: "statslog-docsui-java-gen",
63    tools: ["stats-log-api-gen"],
64    cmd: "$(location stats-log-api-gen) --java $(out) --module docsui --javaPackage com.android.documentsui --javaClass DocumentsStatsLog",
65    out: ["com/android/documentsui/DocumentsStatsLog.java"],
66}
67
68android_library {
69    name: "DocumentsUI-res-lib",
70
71    manifest: "AndroidManifest.xml",
72
73    static_libs: [
74        "androidx.appcompat_appcompat",
75        "com.google.android.material_material",
76    ],
77
78    resource_dirs: [
79        "res",
80    ],
81
82    aaptflags: [
83        "--auto-add-overlay",
84    ],
85
86    min_sdk_version: "28",
87    target_sdk_version: "28",
88    sdk_version: "system_current",
89}
90
91android_app {
92    name: "DocumentsUI",
93
94    defaults: ["documentsui_defaults"],
95
96    manifest: "AndroidManifest.xml",
97
98    srcs: [
99        ":DocumentsUI-srcs",
100    ],
101
102    resource_dirs: [
103        "res",
104    ],
105
106    required: ["privapp_whitelist_com.android.documentsui"],
107}
108