1package { 2 default_team: "trendy_team_android_settings_app", 3 // 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 11// Build SettingsRoboTestStub.apk which includes test-only resources. 12android_app { 13 name: "SettingsRoboTestStub", 14 defaults: [ 15 "SettingsLib-search-defaults", 16 "SettingsLibDefaults", 17 ], 18 platform_apis: true, 19 certificate: "platform", 20 privileged: true, 21 use_resource_processor: true, 22 resource_dirs: ["res"], 23 24 static_libs: [ 25 "Settings-core", 26 "androidx.fragment_fragment", 27 "androidx.fragment_fragment-testing", 28 "androidx.lifecycle_lifecycle-runtime-testing", 29 "frameworks-base-testutils", 30 "kotlinx_coroutines_test", 31 ], 32 33 aaptflags: ["--extra-packages com.android.settings"], 34 35 libs: [ 36 "ims-common", 37 "telephony-common", 38 ], 39 uses_libs: ["org.apache.http.legacy"], 40 optional_uses_libs: [ 41 "androidx.window.extensions", 42 "androidx.window.sidecar", 43 ], 44} 45 46// Settings Robolectric test target. 47android_robolectric_test { 48 name: "SettingsRoboTests", 49 srcs: [ 50 "src/**/*.java", 51 "src/**/*.kt", 52 ], 53 54 // test_suites attribute is not needed. This module will be configured in ATP GCL file. 55 56 static_libs: [ 57 "Robolectric_shadows_androidx_fragment_upstream", 58 "Settings-robo-testutils", 59 "Settings-testutils2", 60 "SettingsLib-robo-testutils", 61 "Settings_robolectric_meta_service_file", 62 "aconfig_settings_flags_lib", 63 "android.webkit.flags-aconfig-java", 64 "androidx.test.core", 65 "androidx.test.espresso.core", 66 "androidx.test.ext.junit", 67 "androidx.test.rules", 68 "androidx.test.runner", 69 "com_android_server_accessibility_flags_lib", 70 "flag-junit", 71 "flag-junit-base", 72 "kotlin-test", 73 "mockito-robolectric-prebuilt", // mockito deps order matters! 74 "mockito-kotlin2", 75 "SettingsLibPreference-testutils", // order matters because it depends on mockito-kotlin2 76 "notification_flags_lib", 77 "platform-test-annotations", 78 "testables", 79 "android.app.flags-aconfig-java", 80 "com_android_systemui_flags_lib", 81 ], 82 83 libs: [ 84 "android.test.mock.impl", 85 "framework-virtualization.stubs.system", 86 "ims-common", 87 ], 88 89 java_resource_dirs: [ 90 "config", 91 "resources", 92 ], 93 94 instrumentation_for: "SettingsRoboTestStub", 95 96 test_options: { 97 timeout: 36000, 98 shards: 10, 99 }, 100 101 coverage_libs: [ 102 "Settings-core", 103 "SettingsLib", 104 "SettingsLib-search", 105 ], 106 107 strict_mode: false, 108} 109 110java_library { 111 name: "Settings-robo-testutils", 112 srcs: [ 113 "testutils/**/*.java", 114 "testutils/**/*.kt", 115 ], 116 libs: [ 117 "Robolectric_all-target", 118 "Settings-core", 119 "androidx.test.core", 120 "mockito-robolectric-prebuilt", 121 "truth", 122 ], 123} 124