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: ["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 43java_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", 54 "apache-commons-compress", 55 "com.google.android.material_material", 56 "guava", 57 ], 58 59 libs: [ 60 "app-compat-annotations", 61 ], 62 63 privileged: true, 64 65 certificate: "platform", 66 67 optimize: { 68 proguard_flags_files: ["proguard.flags"], 69 }, 70 71 sdk_version: "system_current", 72 target_sdk_version: "30", 73 min_sdk_version: "29", 74 75 plugins: [ 76 "java_api_finder", 77 ], 78} 79 80platform_compat_config { 81 name: "documents-ui-compat-config", 82 src: ":DocumentsUI", 83} 84 85filegroup { 86 name: "DocumentsUI-srcs", 87 srcs: [ 88 "src/**/*.java", 89 ":statslog-docsui-java-gen", 90 ], 91} 92 93java_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"], 103 cmd: "$(location stats-log-api-gen) --java $(out) --module docsui" + 104 " --javaPackage com.android.documentsui --javaClass DocumentsStatsLog --minApiLevel 29", 105 out: ["com/android/documentsui/DocumentsStatsLog.java"], 106} 107 108android_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 ], 125 126 sdk_version: "system_current", 127 target_sdk_version: "30", 128 min_sdk_version: "29", 129} 130 131android_library { 132 name: "DocumentsUIUnitTests-res-lib", 133 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", 150 target_sdk_version: "30", 151 min_sdk_version: "29", 152} 153 154android_app { 155 name: "DocumentsUI", 156 157 defaults: ["documentsui_defaults"], 158 159 manifest: "AndroidManifest.xml", 160 161 srcs: [ 162 ":DocumentsUI-srcs", 163 ], 164 165 resource_dirs: [ 166 "res", 167 ], 168 169 required: ["privapp_whitelist_com.android.documentsui"], 170 171 target_sdk_version: "30", 172 min_sdk_version: "29", 173} 174