Colin Cross | fdec9ff | 2019-05-02 13:21:41 -0700 | [diff] [blame] | 1 | // Copyright (C) 2016 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 | |
| 15 | //########################################################### |
| 16 | // SettingsLib Shell app just for Robolectric test target. # |
| 17 | //########################################################### |
| 18 | |
Bob Badour | 8a6a2bc | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 19 | package { |
| 20 | // See: http://go/android-license-faq |
| 21 | // A large-scale-change added 'default_applicable_licenses' to import |
| 22 | // all of the 'license_kinds' from "frameworks_base_license" |
| 23 | // to get the below license kinds: |
| 24 | // SPDX-license-identifier-Apache-2.0 |
| 25 | default_applicable_licenses: ["frameworks_base_license"], |
| 26 | } |
| 27 | |
Colin Cross | fdec9ff | 2019-05-02 13:21:41 -0700 | [diff] [blame] | 28 | android_app { |
| 29 | name: "SettingsLibShell", |
| 30 | defaults: ["SettingsLibDefaults"], |
| 31 | platform_apis: true, |
| 32 | |
| 33 | privileged: true, |
| 34 | |
| 35 | resource_dirs: ["res"], |
| 36 | } |
| 37 | |
| 38 | //########################################################### |
| 39 | // SettingsLib Robolectric test target. # |
| 40 | //########################################################### |
| 41 | android_robolectric_test { |
| 42 | name: "SettingsLibRoboTests", |
| 43 | srcs: ["src/**/*.java"], |
Fan Zhang | 99decdd | 2019-06-20 16:31:28 -0700 | [diff] [blame] | 44 | static_libs: [ |
| 45 | "SettingsLib-robo-testutils", |
arangelov | 51fd49a | 2021-05-14 18:05:54 +0100 | [diff] [blame] | 46 | "androidx.test.core", |
| 47 | "androidx.core_core", |
Felipe Leme | 4e6057e | 2021-05-24 18:10:29 -0700 | [diff] [blame] | 48 | "testng", // TODO: remove once JUnit on Android provides assertThrows |
Fan Zhang | 99decdd | 2019-06-20 16:31:28 -0700 | [diff] [blame] | 49 | ], |
Colin Cross | fdec9ff | 2019-05-02 13:21:41 -0700 | [diff] [blame] | 50 | java_resource_dirs: ["config"], |
| 51 | instrumentation_for: "SettingsLibShell", |
| 52 | coverage_libs: ["SettingsLib"], |
| 53 | test_options: { |
Colin Cross | c337867 | 2019-05-30 11:39:13 -0700 | [diff] [blame] | 54 | timeout: 36000, |
Colin Cross | fdec9ff | 2019-05-02 13:21:41 -0700 | [diff] [blame] | 55 | }, |
| 56 | } |
| 57 | |
| 58 | java_library { |
| 59 | name: "SettingsLib-robo-testutils", |
| 60 | srcs: [ |
Fan Zhang | 99decdd | 2019-06-20 16:31:28 -0700 | [diff] [blame] | 61 | "testutils/com/android/settingslib/testutils/**/*.java", |
Colin Cross | fdec9ff | 2019-05-02 13:21:41 -0700 | [diff] [blame] | 62 | ], |
| 63 | |
| 64 | libs: [ |
| 65 | "Robolectric_all-target", |
Chaohui Wang | d0e9dc0 | 2022-05-07 17:49:24 +0800 | [diff] [blame^] | 66 | "mockito-robolectric-prebuilt", |
Colin Cross | fdec9ff | 2019-05-02 13:21:41 -0700 | [diff] [blame] | 67 | "truth-prebuilt", |
| 68 | ], |
| 69 | } |