blob: 56482904be8e2bf3a56d66210a09e3688f58ebf0 [file] [log] [blame]
Bob Badoura73a6722021-02-25 15:05:14 -08001package {
Aditya Choudhary4f5c1ac2024-02-05 15:41:26 +00002 default_team: "trendy_team_android_settings_app",
Bob Badoura73a6722021-02-25 15:05:14 -08003 // See: http://go/android-license-faq
4 // A large-scale-change added 'default_applicable_licenses' to import
5 // all of the 'license_kinds' from "packages_apps_Settings_license"
6 // to get the below license kinds:
7 // SPDX-license-identifier-Apache-2.0
8 default_applicable_licenses: ["packages_apps_Settings_license"],
9}
10
Chaohui Wang2cab6222023-08-11 13:43:02 +080011// Build SettingsRoboTestStub.apk which includes test-only resources.
Colin Cross946a0fd2019-05-07 11:22:05 -070012android_app {
13 name: "SettingsRoboTestStub",
14 defaults: [
15 "SettingsLibDefaults",
16 "SettingsLib-search-defaults",
17 ],
18 platform_apis: true,
19 certificate: "platform",
20 privileged: true,
Chaohui Wangf5335792023-08-16 13:28:02 +080021 use_resource_processor: true,
Colin Cross946a0fd2019-05-07 11:22:05 -070022 resource_dirs: ["res"],
23
24 static_libs: [
25 "Settings-core",
Justin McClaina3a00042023-08-03 12:09:18 +000026 "androidx.fragment_fragment-testing",
Roshan Pius95892f32023-04-04 15:22:35 -070027 "frameworks-base-testutils",
Rex Hoffman3c961e12023-06-07 20:20:58 +000028 "androidx.fragment_fragment",
Joshua McCloskeyb7021c82023-08-28 20:36:09 +000029 "androidx.lifecycle_lifecycle-runtime-testing",
30 "kotlinx_coroutines_test",
Colin Cross946a0fd2019-05-07 11:22:05 -070031 ],
32
33 aaptflags: ["--extra-packages com.android.settings"],
34
35 libs: [
36 "telephony-common",
37 "ims-common",
38 ],
Bonian Chene69d1a62021-01-06 05:41:46 +000039 uses_libs: ["org.apache.http.legacy"],
ykhung4c1702c2021-10-18 21:43:17 +080040 optional_uses_libs: [
41 "androidx.window.extensions",
42 "androidx.window.sidecar",
43 ],
Colin Cross946a0fd2019-05-07 11:22:05 -070044}
45
Chaohui Wang2cab6222023-08-11 13:43:02 +080046// Settings Robolectric test target.
Colin Cross946a0fd2019-05-07 11:22:05 -070047android_robolectric_test {
48 name: "SettingsRoboTests",
49 srcs: [
50 "src/**/*.java",
Chaohui Wang2b11c1f2022-10-09 17:52:36 +080051 "src/**/*.kt",
Colin Cross946a0fd2019-05-07 11:22:05 -070052 ],
53
Fan Wu0f3e9022023-12-05 06:24:06 +000054 // test_suites attribute is not needed. This module will be configured in ATP GCL file.
FanWu87318572023-11-29 15:10:12 +080055
Colin Cross946a0fd2019-05-07 11:22:05 -070056 static_libs: [
Rex Hoffman3c961e12023-06-07 20:20:58 +000057 "Robolectric_shadows_androidx_fragment_upstream",
58 "Settings_robolectric_meta_service_file",
Colin Cross946a0fd2019-05-07 11:22:05 -070059 "SettingsLib-robo-testutils",
Chaohui Wang2cab6222023-08-11 13:43:02 +080060 "Settings-robo-testutils",
Ziad Youssefe41e5442023-12-12 14:57:26 +000061 "android.webkit.flags-aconfig-java",
Bonian Chen5cf137e2019-12-03 18:42:49 +080062 "androidx.test.core",
Chaohui Wang2cab6222023-08-11 13:43:02 +080063 "androidx.test.espresso.core",
64 "androidx.test.ext.junit",
Florian Mayer5696dde2022-09-15 14:31:42 -070065 "androidx.test.rules",
Bonian Chen5cf137e2019-12-03 18:42:49 +080066 "androidx.test.runner",
Yiyi Shenb7c914d2023-08-30 19:21:20 +080067 "flag-junit",
Manish Singh6efc4552023-09-28 12:02:21 +010068 "flag-junit-base",
Yiyi Shenb7c914d2023-08-30 19:21:20 +080069 "aconfig_settings_flags_lib",
70 "platform-test-annotations",
Joshua McCloskey1ec20252023-09-08 16:04:25 +000071 "Settings-testutils2",
Valentin Iftime9f82e732023-06-30 15:04:56 +020072 "notification_flags_lib",
Jean Chen48d73aa2023-10-18 23:11:54 +080073 "com_android_server_accessibility_flags_lib",
Colin Cross946a0fd2019-05-07 11:22:05 -070074 ],
75
Anton Hanssond3c9df32020-07-21 10:10:26 +010076 libs: [
77 "ims-common",
78 ],
79
Krzysztof Kosińskic81fbce2023-10-11 19:39:33 +000080 java_resource_dirs: [
81 "config",
82 "resources",
83 ],
Colin Cross946a0fd2019-05-07 11:22:05 -070084
85 instrumentation_for: "SettingsRoboTestStub",
86
87 test_options: {
Colin Cross02ce47c2019-05-30 11:32:07 -070088 timeout: 36000,
Mill Chen5606a8c2019-08-07 16:34:17 +080089 shards: 10,
Colin Cross946a0fd2019-05-07 11:22:05 -070090 },
91
92 coverage_libs: [
93 "Settings-core",
94 "SettingsLib",
95 "SettingsLib-search",
96 ],
Rex Hoffman3c961e12023-06-07 20:20:58 +000097
98 upstream: true,
Colin Cross946a0fd2019-05-07 11:22:05 -070099}
Colin Crossdc7bc482020-12-08 13:12:13 -0800100
101java_library {
102 name: "Settings-robo-testutils",
Chaohui Wang2cab6222023-08-11 13:43:02 +0800103 srcs: ["testutils/**/*.java"],
Colin Crossdc7bc482020-12-08 13:12:13 -0800104 libs: [
Rex Hoffman3c961e12023-06-07 20:20:58 +0000105 "Robolectric_all-target_upstream",
Colin Crossdc7bc482020-12-08 13:12:13 -0800106 "Settings-core",
Colin Crossdc7bc482020-12-08 13:12:13 -0800107 "mockito-robolectric-prebuilt",
Krzysztof Kosińskic81fbce2023-10-11 19:39:33 +0000108 "truth",
Colin Crossdc7bc482020-12-08 13:12:13 -0800109 ],
110}