Convert Android.mk file to Android.bp
See build/soong/README.md for more information.
Bug: 122333363
Test: treehugger
Change-Id: Idb03dd371284aec57ed356c6091965672b7b95f5
diff --git a/tests/Android.bp b/tests/Android.bp
new file mode 100644
index 0000000..b15ded4
--- /dev/null
+++ b/tests/Android.bp
@@ -0,0 +1,23 @@
+android_test {
+ name: "ContactsProviderTests",
+ static_libs: [
+ "ContactsProviderTestUtils",
+ "androidx.test.rules",
+ "mockito-target-minus-junit4",
+ ],
+ libs: [
+ "android.test.runner",
+ "android.test.base",
+ "android.test.mock",
+ ],
+
+ // Only compile source java files in this apk.
+ srcs: ["src/**/*.java"],
+ platform_apis: true,
+ test_suites: ["device-tests"],
+ instrumentation_for: "ContactsProvider",
+ certificate: "shared",
+ optimize: {
+ enabled: false,
+ },
+}
diff --git a/tests/Android.mk b/tests/Android.mk
deleted file mode 100644
index 87b7ab6..0000000
--- a/tests/Android.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-# We only want this apk build for tests.
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- ContactsProviderTestUtils \
- androidx.test.rules \
- mockito-target-minus-junit4
-
-LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base android.test.mock
-
-# Only compile source java files in this apk.
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_PACKAGE_NAME := ContactsProviderTests
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_COMPATIBILITY_SUITE := device-tests
-
-LOCAL_INSTRUMENTATION_FOR := ContactsProvider
-LOCAL_CERTIFICATE := shared
-
-LOCAL_PROGUARD_ENABLED := disabled
-
-include $(BUILD_PACKAGE)