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 30aconfig_declarations { 31 name: "docsui-flags-aconfig", 32 package: "com.android.documentsui.flags", 33 container: "system", 34 srcs: ["flags.aconfig"], 35} 36 37java_aconfig_library { 38 name: "docsui-flags-aconfig-java-lib", 39 aconfig_declarations: "docsui-flags-aconfig", 40 min_sdk_version: "29", 41 sdk_version: "system_current", 42} 43 44java_library { 45 name: "docsui-change-ids", 46 srcs: ["src/com/android/documentsui/ChangeIds.java"], 47 libs: ["app-compat-annotations"], 48 min_sdk_version: "29", 49 sdk_version: "system_current", 50} 51 52java_defaults { 53 name: "documentsui_defaults", 54 55 static_libs: [ 56 "androidx.appcompat_appcompat", 57 "androidx.legacy_legacy-support-core-ui", 58 "androidx.legacy_legacy-support-v13", 59 "androidx.legacy_legacy-support-v4", 60 "androidx.recyclerview_recyclerview", 61 "androidx.recyclerview_recyclerview-selection", 62 "androidx.transition_transition", 63 "apache-commons-compress", 64 "com.google.android.material_material", 65 "docsui-change-ids", 66 "guava", 67 "modules-utils-build_system", 68 ], 69 70 privileged: true, 71 72 certificate: "platform", 73 74 optimize: { 75 shrink_resources: true, 76 proguard_flags_files: ["proguard.flags"], 77 }, 78 79 sdk_version: "system_current", 80 min_sdk_version: "29", 81} 82 83platform_compat_config { 84 name: "documents-ui-compat-config", 85 src: ":docsui-change-ids", 86} 87 88java_library { 89 name: "docsui-statsd", 90 srcs: [ 91 ":statslog-docsui-java-gen", 92 ], 93 libs: [ 94 "androidx.annotation_annotation", 95 ], 96 lint: { 97 strict_updatability_linting: true, 98 }, 99} 100 101genrule { 102 name: "statslog-docsui-java-gen", 103 tools: ["stats-log-api-gen"], 104 cmd: "$(location stats-log-api-gen) --java $(out) --module docsui" + 105 " --javaPackage com.android.documentsui --javaClass DocumentsStatsLog --minApiLevel 29", 106 out: ["com/android/documentsui/DocumentsStatsLog.java"], 107} 108 109android_library { 110 name: "DocumentsUI-lib", 111 defaults: ["documentsui_defaults"], 112 static_libs: ["docsui-flags-aconfig-java-lib"], 113 flags_packages: ["docsui-flags-aconfig"], 114 115 manifest: "AndroidManifestLib.xml", 116 117 resource_dirs: [ 118 "res", 119 ], 120 121 aaptflags: [ 122 "--auto-add-overlay", 123 ], 124 125 // This is included in `documentsui_defaults`. 126 exclude_srcs: ["src/com/android/documentsui/ChangeIds.java"], 127 128 srcs: [ 129 "src/**/*.java", 130 "src/**/*.kt", 131 ":statslog-docsui-java-gen", 132 ], 133 134 sdk_version: "system_current", 135 target_sdk_version: "33", 136 min_sdk_version: "29", 137 lint: { 138 baseline_filename: "lint-baseline.xml", 139 }, 140} 141 142android_library { 143 name: "DocumentsUIManifestLib", 144 defaults: ["documentsui_defaults"], 145 146 manifest: "AndroidManifest.xml", 147 148 resource_dirs: [], 149 libs: ["DocumentsUI-lib"], 150 151 sdk_version: "system_current", 152 target_sdk_version: "33", 153 min_sdk_version: "29", 154} 155 156android_app { 157 name: "DocumentsUI", 158 159 defaults: ["documentsui_defaults"], 160 161 manifest: "AndroidManifest.xml", 162 163 static_libs: ["DocumentsUI-lib"], 164 resource_dirs: [], 165 166 licenses: [ 167 "Android-Apache-2.0", 168 "packages_apps_DocumentsUI_res_drawable_pd_license", 169 ], 170 171 required: ["privapp_whitelist_com.android.documentsui"], 172 173 min_sdk_version: "29", 174 updatable: true, 175} 176