Winson | 9947f1e | 2019-08-16 10:20:39 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2019 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
| 16 | |
| 17 | android_test { |
| 18 | name: "FrameworksResourceLoaderTests", |
| 19 | srcs: [ |
| 20 | "src/**/*.kt" |
| 21 | ], |
| 22 | libs: [ |
| 23 | "android.test.runner", |
| 24 | "android.test.base", |
| 25 | ], |
| 26 | static_libs: [ |
| 27 | "androidx.test.espresso.core", |
| 28 | "androidx.test.ext.junit", |
| 29 | "androidx.test.runner", |
| 30 | "androidx.test.rules", |
| 31 | "mockito-target-minus-junit4", |
| 32 | "truth-prebuilt", |
| 33 | ], |
| 34 | resource_zips: [ ":FrameworksResourceLoaderTestsAssets" ], |
| 35 | test_suites: ["device-tests"], |
| 36 | sdk_version: "test_current", |
| 37 | aaptflags: [ |
| 38 | "--no-compress", |
| 39 | ], |
| 40 | data: [ |
| 41 | ":FrameworksResourceLoaderTestsOverlay", |
| 42 | ":FrameworksResourceLoaderTestsSplitOne", |
| 43 | ":FrameworksResourceLoaderTestsSplitTwo", |
| 44 | ], |
| 45 | java_resources: [ "NonAsset.txt" ] |
| 46 | } |
| 47 | |
| 48 | filegroup { |
| 49 | name: "FrameworksResourceLoaderTestsResources", |
| 50 | srcs: ["resources"], |
| 51 | } |
| 52 | |
| 53 | genrule { |
| 54 | name: "FrameworksResourceLoaderTestsAssets", |
| 55 | srcs: [ |
| 56 | ":framework-res", |
| 57 | ":FrameworksResourceLoaderTestsResources", |
| 58 | ], |
| 59 | tools: [ ":aapt2", ":soong_zip" ], |
| 60 | tool_files: [ "resources/compileAndLink.sh" ], |
| 61 | cmd: "$(location resources/compileAndLink.sh) $(location :aapt2) $(location :soong_zip) $(genDir) $(in) $(in)", |
| 62 | out: [ "out.zip" ] |
| 63 | } |