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