felkachang | 864699a | 2019-01-11 16:28:17 +0800 | [diff] [blame] | 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 | |
felkachang | acf1bd4 | 2018-10-08 15:42:19 +0800 | [diff] [blame] | 15 | java_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", |
felkachang | 1556c36 | 2018-08-30 16:21:59 +0800 | [diff] [blame] | 26 | "apache-commons-compress", |
felkachang | acf1bd4 | 2018-10-08 15:42:19 +0800 | [diff] [blame] | 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 | |
Jeff Sharkey | a803288 | 2018-12-12 09:42:26 -0700 | [diff] [blame] | 39 | sdk_version: "system_current", |
Jeff Hamilton | 1ecca35 | 2019-03-06 23:09:40 -0500 | [diff] [blame] | 40 | min_sdk_version: "28", |
| 41 | target_sdk_version: "28", |
Kun Niu | 5d29a01 | 2019-07-01 18:06:43 -0700 | [diff] [blame] | 42 | |
| 43 | plugins: ["java_api_finder"], |
felkachang | acf1bd4 | 2018-10-08 15:42:19 +0800 | [diff] [blame] | 44 | } |
| 45 | |
Bill Lin | e77ec52 | 2019-02-12 19:35:12 +0800 | [diff] [blame] | 46 | filegroup { |
| 47 | name: "DocumentsUI-srcs", |
| 48 | srcs: [ |
| 49 | "src/**/*.java", |
shawnlin | a06573a | 2019-04-09 15:48:43 +0800 | [diff] [blame] | 50 | ":statslog-docsui-java-gen", |
Bill Lin | e77ec52 | 2019-02-12 19:35:12 +0800 | [diff] [blame] | 51 | ], |
| 52 | } |
| 53 | |
shawnlin | a06573a | 2019-04-09 15:48:43 +0800 | [diff] [blame] | 54 | java_library { |
| 55 | name: "docsui-statsd", |
| 56 | srcs: [ |
| 57 | ":statslog-docsui-java-gen", |
| 58 | ], |
| 59 | } |
| 60 | |
| 61 | genrule { |
| 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 | |
Bill Lin | e77ec52 | 2019-02-12 19:35:12 +0800 | [diff] [blame] | 68 | android_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 | ], |
Jeff Hamilton | 1ecca35 | 2019-03-06 23:09:40 -0500 | [diff] [blame] | 85 | |
| 86 | min_sdk_version: "28", |
| 87 | target_sdk_version: "28", |
Jeongik Cha | 6fb887e | 2019-11-01 15:23:11 +0900 | [diff] [blame] | 88 | sdk_version: "system_current", |
Bill Lin | e77ec52 | 2019-02-12 19:35:12 +0800 | [diff] [blame] | 89 | } |
| 90 | |
felkachang | acf1bd4 | 2018-10-08 15:42:19 +0800 | [diff] [blame] | 91 | android_app { |
felkachang | acf1bd4 | 2018-10-08 15:42:19 +0800 | [diff] [blame] | 92 | name: "DocumentsUI", |
| 93 | |
| 94 | defaults: ["documentsui_defaults"], |
| 95 | |
| 96 | manifest: "AndroidManifest.xml", |
| 97 | |
| 98 | srcs: [ |
shawnlin | a06573a | 2019-04-09 15:48:43 +0800 | [diff] [blame] | 99 | ":DocumentsUI-srcs", |
felkachang | acf1bd4 | 2018-10-08 15:42:19 +0800 | [diff] [blame] | 100 | ], |
| 101 | |
| 102 | resource_dirs: [ |
| 103 | "res", |
| 104 | ], |
Bill Lin | 24499e6 | 2019-05-14 18:15:42 +0800 | [diff] [blame] | 105 | |
| 106 | required: ["privapp_whitelist_com.android.documentsui"], |
felkachang | acf1bd4 | 2018-10-08 15:42:19 +0800 | [diff] [blame] | 107 | } |