Revert "setup robolectric for sysui"
This reverts commit fac84d7fdf3720724e21af59eb9776c09612689c.
Reason for revert: Causes an exception in errorprone. Example log:
https://android-build.googleplex.com/builds/pending/P44757438/errorprone/latest/view/logs/error.log
Change-Id: I9fe91baf83641ae0c2e94b5bb049cb99c39cfde6
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
index f1cef7a..96bbf49 100644
--- a/packages/SystemUI/Android.bp
+++ b/packages/SystemUI/Android.bp
@@ -167,15 +167,25 @@
}
android_library {
- name: "SystemUI-tests-base",
+ name: "SystemUI-tests",
manifest: "tests/AndroidManifest-base.xml",
-
+ additional_manifests: ["tests/AndroidManifest.xml"],
+
resource_dirs: [
"tests/res",
"res-product",
"res-keyguard",
"res",
],
+ srcs: [
+ "tests/src/**/*.kt",
+ "tests/src/**/*.java",
+ "src/**/*.kt",
+ "src/**/*.java",
+ "src/**/I*.aidl",
+ ":ReleaseJavaFiles",
+ ":SystemUI-tests-utils",
+ ],
static_libs: [
"WifiTrackerLib",
"SystemUIAnimationLib",
@@ -214,6 +224,9 @@
"metrics-helper-lib",
"hamcrest-library",
"androidx.test.rules",
+ "androidx.test.uiautomator_uiautomator",
+ "mockito-target-extended-minus-junit4",
+ "androidx.test.ext.junit",
"testables",
"truth-prebuilt",
"monet",
@@ -228,36 +241,6 @@
"android.test.base",
"android.test.mock",
],
-}
-
-// Device tests only
-android_library {
- name: "SystemUI-tests",
- manifest: "tests/AndroidManifest.xml",
- additional_manifests: ["tests/AndroidManifest.xml"],
- resource_dirs: [],
- srcs: [
- // Kotlin likes all files in the same module for internal
- "src/**/*.kt",
- "src/**/*.java",
- "src/**/I*.aidl",
- ":ReleaseJavaFiles",
- "tests/src/**/*.kt",
- "tests/src/**/*.java",
- ":SystemUI-tests-utils",
- ],
- dont_merge_manifests: true,
- static_libs: [
- "SystemUI-tests-base",
- "androidx.test.uiautomator_uiautomator",
- "mockito-target-extended-minus-junit4",
- "androidx.test.ext.junit",
- ],
- libs: [
- "android.test.runner",
- "android.test.base",
- "android.test.mock",
- ],
kotlincflags: ["-Xjvm-default=enable"],
aaptflags: [
"--extra-packages",
@@ -269,58 +252,6 @@
},
}
-android_app {
- name: "SystemUIRobo-stub",
- defaults: [
- "platform_app_defaults",
- "SystemUI_app_defaults",
- ],
- srcs: [
- "src/**/*.kt",
- "src/**/*.java",
- "src/**/I*.aidl",
- ":ReleaseJavaFiles",
- ],
- manifest: "tests/AndroidManifest-base.xml",
- static_libs: [
- "SystemUI-tests-base",
- ],
- aaptflags: [
- "--extra-packages",
- "com.android.systemui",
- ],
- dont_merge_manifests: true,
- platform_apis: true,
- system_ext_specific: true,
- certificate: "platform",
- privileged: true,
- resource_dirs: [],
-
- kotlincflags: ["-Xjvm-default=enable"],
- dxflags: ["--multi-dex"],
- required: [
- "privapp_whitelist_com.android.systemui",
- ],
- plugins: ["dagger2-compiler"],
-}
-
-android_robolectric_test {
- name: "SystemUiRoboTests",
- srcs: [
- "tests/robolectric/src/**/*.kt",
- "tests/robolectric/src/**/*.java",
- ],
- libs: [
- "android.test.runner",
- "android.test.base",
- "android.test.mock",
- "truth-prebuilt",
- ],
- kotlincflags: ["-Xjvm-default=enable"],
- instrumentation_for: "SystemUIRobo-stub",
- java_resource_dirs: ["tests/robolectric/config"],
-}
-
// Opt-out config for optimizing the SystemUI target using R8.
// Disabled via `export SYSTEMUI_OPTIMIZE_JAVA=false`, or explicitly in Make via
// `SYSTEMUI_OPTIMIZE_JAVA := false`.