Convert Contacts to Android.bp
See build/soong/README.md for more information.
Fixes: 122333342
Test: adb shell am instrument -w com.android.contacts.tests/androidx.test.runner.AndroidJUnitRunner
Tests run: 317, Failures: 27
Change-Id: I81f4942c2aee8c2843444011b3af3be365c989e6
diff --git a/tests/Android.bp b/tests/Android.bp
new file mode 100644
index 0000000..7754fd4
--- /dev/null
+++ b/tests/Android.bp
@@ -0,0 +1,25 @@
+android_test {
+ name: "ContactsTests",
+
+ certificate: "shared",
+
+ srcs: ["src/**/*.java"],
+
+ instrumentation_for: "Contacts",
+
+ sdk_version: "current",
+ min_sdk_version: "21",
+
+ static_libs: [
+ "androidx.test.rules",
+ "hamcrest-library",
+ "mockito-target-minus-junit4",
+ "ub-uiautomator",
+ ],
+
+ libs: [
+ "android.test.runner.stubs",
+ "android.test.base.stubs",
+ "android.test.mock.stubs",
+ ],
+}
diff --git a/tests/Android.mk b/tests/Android.mk
deleted file mode 100644
index ce4e6ad..0000000
--- a/tests/Android.mk
+++ /dev/null
@@ -1,36 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-# We only want this apk build for tests.
-LOCAL_MODULE_TAGS := tests
-LOCAL_CERTIFICATE := shared
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-res_dirs := res
-LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs))
-
-LOCAL_PACKAGE_NAME := ContactsTests
-
-LOCAL_INSTRUMENTATION_FOR := Contacts
-
-LOCAL_SDK_VERSION := current
-LOCAL_MIN_SDK_VERSION := 21
-
-LOCAL_STATIC_JAVA_LIBRARIES += \
- androidx.test.rules \
- hamcrest-library \
- mockito-target-minus-junit4 \
- ub-uiautomator
-
-LOCAL_JAVA_LIBRARIES := \
- android.test.runner.stubs \
- android.test.base.stubs \
- android.test.mock.stubs \
-
-
-LOCAL_AAPT_FLAGS := \
- --auto-add-overlay \
- --extra-packages com.android.contacts.common.tests
-
-include $(BUILD_PACKAGE)