Jiun-Yang Hsu | 7a3635e | 2020-12-31 14:18:01 +0800 | [diff] [blame] | 1 | //############################################################ |
Colin Cross | 946a0fd | 2019-05-07 11:22:05 -0700 | [diff] [blame] | 2 | // Build SettingsRoboTestStub.apk which includes test-only resources.# |
| 3 | //############################################################ |
| 4 | |
Bob Badour | a73a672 | 2021-02-25 15:05:14 -0800 | [diff] [blame] | 5 | package { |
| 6 | // See: http://go/android-license-faq |
| 7 | // A large-scale-change added 'default_applicable_licenses' to import |
| 8 | // all of the 'license_kinds' from "packages_apps_Settings_license" |
| 9 | // to get the below license kinds: |
| 10 | // SPDX-license-identifier-Apache-2.0 |
| 11 | default_applicable_licenses: ["packages_apps_Settings_license"], |
| 12 | } |
| 13 | |
Colin Cross | 946a0fd | 2019-05-07 11:22:05 -0700 | [diff] [blame] | 14 | android_app { |
| 15 | name: "SettingsRoboTestStub", |
| 16 | defaults: [ |
| 17 | "SettingsLibDefaults", |
| 18 | "SettingsLib-search-defaults", |
| 19 | ], |
| 20 | platform_apis: true, |
| 21 | certificate: "platform", |
| 22 | privileged: true, |
| 23 | |
| 24 | resource_dirs: ["res"], |
| 25 | |
| 26 | static_libs: [ |
| 27 | "Settings-core", |
| 28 | "androidx-constraintlayout_constraintlayout", |
| 29 | "androidx.slice_slice-builders", |
| 30 | "androidx.slice_slice-core", |
| 31 | "androidx.slice_slice-view", |
| 32 | "androidx.core_core", |
| 33 | "androidx.appcompat_appcompat", |
| 34 | "androidx.cardview_cardview", |
| 35 | "androidx.preference_preference", |
| 36 | "androidx.recyclerview_recyclerview", |
| 37 | "com.google.android.material_material", |
| 38 | "setupcompat", |
| 39 | "setupdesign", |
| 40 | "androidx-constraintlayout_constraintlayout-solver", |
| 41 | "androidx.lifecycle_lifecycle-runtime", |
| 42 | "androidx.lifecycle_lifecycle-extensions", |
Bonian Chen | f1b43a9 | 2019-11-04 10:36:39 +0800 | [diff] [blame] | 43 | "androidx.test.core", |
| 44 | "androidx.test.runner", |
| 45 | "androidx.test.ext.junit", |
Colin Cross | 946a0fd | 2019-05-07 11:22:05 -0700 | [diff] [blame] | 46 | "guava", |
| 47 | "jsr305", |
| 48 | "settings-contextual-card-protos-lite", |
| 49 | "settings-log-bridge-protos-lite", |
| 50 | "contextualcards", |
| 51 | "settings-logtags", |
| 52 | "zxing-core-1.7", |
| 53 | ], |
| 54 | |
| 55 | aaptflags: ["--extra-packages com.android.settings"], |
| 56 | |
| 57 | libs: [ |
| 58 | "telephony-common", |
| 59 | "ims-common", |
| 60 | ], |
Bonian Chen | e69d1a6 | 2021-01-06 05:41:46 +0000 | [diff] [blame] | 61 | uses_libs: ["org.apache.http.legacy"], |
Colin Cross | 946a0fd | 2019-05-07 11:22:05 -0700 | [diff] [blame] | 62 | } |
| 63 | |
| 64 | //############################################################ |
| 65 | // Settings Robolectric test target. # |
| 66 | //############################################################ |
| 67 | android_robolectric_test { |
| 68 | name: "SettingsRoboTests", |
| 69 | srcs: [ |
| 70 | "src/**/*.java", |
| 71 | ], |
| 72 | |
| 73 | static_libs: [ |
| 74 | "SettingsLib-robo-testutils", |
arangelov | d79ab00 | 2021-05-12 15:22:34 +0100 | [diff] [blame] | 75 | "android-support-annotations", |
Bonian Chen | 5cf137e | 2019-12-03 18:42:49 +0800 | [diff] [blame] | 76 | "androidx.test.core", |
| 77 | "androidx.test.runner", |
| 78 | "androidx.test.ext.junit", |
arangelov | d79ab00 | 2021-05-12 15:22:34 +0100 | [diff] [blame] | 79 | "androidx.test.espresso.core", |
Colin Cross | 946a0fd | 2019-05-07 11:22:05 -0700 | [diff] [blame] | 80 | ], |
| 81 | |
Anton Hansson | d3c9df3 | 2020-07-21 10:10:26 +0100 | [diff] [blame] | 82 | libs: [ |
| 83 | "ims-common", |
| 84 | ], |
| 85 | |
Bonian Chen | f1b43a9 | 2019-11-04 10:36:39 +0800 | [diff] [blame] | 86 | java_resource_dirs: ["config", "resources"], |
Colin Cross | 946a0fd | 2019-05-07 11:22:05 -0700 | [diff] [blame] | 87 | |
| 88 | instrumentation_for: "SettingsRoboTestStub", |
| 89 | |
| 90 | test_options: { |
Colin Cross | 02ce47c | 2019-05-30 11:32:07 -0700 | [diff] [blame] | 91 | timeout: 36000, |
Mill Chen | 5606a8c | 2019-08-07 16:34:17 +0800 | [diff] [blame] | 92 | shards: 10, |
Colin Cross | 946a0fd | 2019-05-07 11:22:05 -0700 | [diff] [blame] | 93 | }, |
| 94 | |
| 95 | coverage_libs: [ |
| 96 | "Settings-core", |
| 97 | "SettingsLib", |
| 98 | "SettingsLib-search", |
| 99 | ], |
| 100 | } |
Colin Cross | dc7bc48 | 2020-12-08 13:12:13 -0800 | [diff] [blame] | 101 | |
| 102 | java_library { |
| 103 | name: "Settings-robo-testutils", |
| 104 | srcs: ["src/com/android/settings/testutils/**/*.java"], |
| 105 | |
| 106 | libs: [ |
| 107 | "Settings-core", |
| 108 | "Robolectric_all-target", |
| 109 | "mockito-robolectric-prebuilt", |
| 110 | "truth-prebuilt", |
| 111 | ], |
| 112 | } |