blob: 95a78c75ab21082fc0fd7b684e0fc54b931b494d [file] [log] [blame]
Bob Badoura73a6722021-02-25 15:05:14 -08001package {
2 // See: http://go/android-license-faq
3 // A large-scale-change added 'default_applicable_licenses' to import
4 // all of the 'license_kinds' from "packages_apps_Settings_license"
5 // to get the below license kinds:
6 // SPDX-license-identifier-Apache-2.0
7 default_applicable_licenses: ["packages_apps_Settings_license"],
8}
9
Chaohui Wang2cab6222023-08-11 13:43:02 +080010// Build SettingsRoboTestStub.apk which includes test-only resources.
Colin Cross946a0fd2019-05-07 11:22:05 -070011android_app {
12 name: "SettingsRoboTestStub",
13 defaults: [
14 "SettingsLibDefaults",
15 "SettingsLib-search-defaults",
16 ],
17 platform_apis: true,
18 certificate: "platform",
19 privileged: true,
Chaohui Wangf5335792023-08-16 13:28:02 +080020 use_resource_processor: true,
Colin Cross946a0fd2019-05-07 11:22:05 -070021 resource_dirs: ["res"],
22
23 static_libs: [
24 "Settings-core",
Justin McClaina3a00042023-08-03 12:09:18 +000025 "androidx.fragment_fragment-testing",
Roshan Pius95892f32023-04-04 15:22:35 -070026 "frameworks-base-testutils",
Rex Hoffman3c961e12023-06-07 20:20:58 +000027 "androidx.fragment_fragment",
Joshua McCloskeyb7021c82023-08-28 20:36:09 +000028 "androidx.lifecycle_lifecycle-runtime-testing",
29 "kotlinx_coroutines_test",
Colin Cross946a0fd2019-05-07 11:22:05 -070030 ],
31
32 aaptflags: ["--extra-packages com.android.settings"],
33
34 libs: [
35 "telephony-common",
36 "ims-common",
37 ],
Bonian Chene69d1a62021-01-06 05:41:46 +000038 uses_libs: ["org.apache.http.legacy"],
ykhung4c1702c2021-10-18 21:43:17 +080039 optional_uses_libs: [
40 "androidx.window.extensions",
41 "androidx.window.sidecar",
42 ],
Colin Cross946a0fd2019-05-07 11:22:05 -070043}
44
Chaohui Wang2cab6222023-08-11 13:43:02 +080045// Settings Robolectric test target.
Colin Cross946a0fd2019-05-07 11:22:05 -070046android_robolectric_test {
47 name: "SettingsRoboTests",
48 srcs: [
49 "src/**/*.java",
Chaohui Wang2b11c1f2022-10-09 17:52:36 +080050 "src/**/*.kt",
Colin Cross946a0fd2019-05-07 11:22:05 -070051 ],
52
Fan Wu0f3e9022023-12-05 06:24:06 +000053 // test_suites attribute is not needed. This module will be configured in ATP GCL file.
FanWu87318572023-11-29 15:10:12 +080054
Colin Cross946a0fd2019-05-07 11:22:05 -070055 static_libs: [
Rex Hoffman3c961e12023-06-07 20:20:58 +000056 "Robolectric_shadows_androidx_fragment_upstream",
57 "Settings_robolectric_meta_service_file",
Colin Cross946a0fd2019-05-07 11:22:05 -070058 "SettingsLib-robo-testutils",
Chaohui Wang2cab6222023-08-11 13:43:02 +080059 "Settings-robo-testutils",
Bonian Chen5cf137e2019-12-03 18:42:49 +080060 "androidx.test.core",
Chaohui Wang2cab6222023-08-11 13:43:02 +080061 "androidx.test.espresso.core",
62 "androidx.test.ext.junit",
Florian Mayer5696dde2022-09-15 14:31:42 -070063 "androidx.test.rules",
Bonian Chen5cf137e2019-12-03 18:42:49 +080064 "androidx.test.runner",
Yiyi Shenb7c914d2023-08-30 19:21:20 +080065 "flag-junit",
Manish Singh6efc4552023-09-28 12:02:21 +010066 "flag-junit-base",
Yiyi Shenb7c914d2023-08-30 19:21:20 +080067 "aconfig_settings_flags_lib",
68 "platform-test-annotations",
Joshua McCloskey1ec20252023-09-08 16:04:25 +000069 "Settings-testutils2",
Valentin Iftime9f82e732023-06-30 15:04:56 +020070 "notification_flags_lib",
Jean Chen48d73aa2023-10-18 23:11:54 +080071 "com_android_server_accessibility_flags_lib",
Colin Cross946a0fd2019-05-07 11:22:05 -070072 ],
73
Anton Hanssond3c9df32020-07-21 10:10:26 +010074 libs: [
75 "ims-common",
76 ],
77
Krzysztof Kosińskic81fbce2023-10-11 19:39:33 +000078 java_resource_dirs: [
79 "config",
80 "resources",
81 ],
Colin Cross946a0fd2019-05-07 11:22:05 -070082
83 instrumentation_for: "SettingsRoboTestStub",
84
85 test_options: {
Colin Cross02ce47c2019-05-30 11:32:07 -070086 timeout: 36000,
Mill Chen5606a8c2019-08-07 16:34:17 +080087 shards: 10,
Colin Cross946a0fd2019-05-07 11:22:05 -070088 },
89
90 coverage_libs: [
91 "Settings-core",
92 "SettingsLib",
93 "SettingsLib-search",
94 ],
Rex Hoffman3c961e12023-06-07 20:20:58 +000095
96 upstream: true,
Colin Cross946a0fd2019-05-07 11:22:05 -070097}
Colin Crossdc7bc482020-12-08 13:12:13 -080098
99java_library {
100 name: "Settings-robo-testutils",
Chaohui Wang2cab6222023-08-11 13:43:02 +0800101 srcs: ["testutils/**/*.java"],
Colin Crossdc7bc482020-12-08 13:12:13 -0800102 libs: [
Rex Hoffman3c961e12023-06-07 20:20:58 +0000103 "Robolectric_all-target_upstream",
Colin Crossdc7bc482020-12-08 13:12:13 -0800104 "Settings-core",
Colin Crossdc7bc482020-12-08 13:12:13 -0800105 "mockito-robolectric-prebuilt",
Krzysztof Kosińskic81fbce2023-10-11 19:39:33 +0000106 "truth",
Colin Crossdc7bc482020-12-08 13:12:13 -0800107 ],
108}