blob: 9b2e97f48aaffeb29f9b1013fa77ae9df6ab32ac [file] [log] [blame]
Jiun-Yang Hsu7a3635e2020-12-31 14:18:01 +08001 //############################################################
Colin Cross946a0fd2019-05-07 11:22:05 -07002// Build SettingsRoboTestStub.apk which includes test-only resources.#
3//############################################################
4
Bob Badoura73a6722021-02-25 15:05:14 -08005package {
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 Cross946a0fd2019-05-07 11:22:05 -070014android_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 Chenf1b43a92019-11-04 10:36:39 +080043 "androidx.test.core",
44 "androidx.test.runner",
45 "androidx.test.ext.junit",
Colin Cross946a0fd2019-05-07 11:22:05 -070046 "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 Chene69d1a62021-01-06 05:41:46 +000061 uses_libs: ["org.apache.http.legacy"],
Colin Cross946a0fd2019-05-07 11:22:05 -070062}
63
64//############################################################
65// Settings Robolectric test target. #
66//############################################################
67android_robolectric_test {
68 name: "SettingsRoboTests",
69 srcs: [
70 "src/**/*.java",
71 ],
72
73 static_libs: [
74 "SettingsLib-robo-testutils",
arangelovd79ab002021-05-12 15:22:34 +010075 "android-support-annotations",
Bonian Chen5cf137e2019-12-03 18:42:49 +080076 "androidx.test.core",
77 "androidx.test.runner",
78 "androidx.test.ext.junit",
arangelovd79ab002021-05-12 15:22:34 +010079 "androidx.test.espresso.core",
Colin Cross946a0fd2019-05-07 11:22:05 -070080 ],
81
Anton Hanssond3c9df32020-07-21 10:10:26 +010082 libs: [
83 "ims-common",
84 ],
85
Bonian Chenf1b43a92019-11-04 10:36:39 +080086 java_resource_dirs: ["config", "resources"],
Colin Cross946a0fd2019-05-07 11:22:05 -070087
88 instrumentation_for: "SettingsRoboTestStub",
89
90 test_options: {
Colin Cross02ce47c2019-05-30 11:32:07 -070091 timeout: 36000,
Mill Chen5606a8c2019-08-07 16:34:17 +080092 shards: 10,
Colin Cross946a0fd2019-05-07 11:22:05 -070093 },
94
95 coverage_libs: [
96 "Settings-core",
97 "SettingsLib",
98 "SettingsLib-search",
99 ],
100}
Colin Crossdc7bc482020-12-08 13:12:13 -0800101
102java_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}