Convert Android.mk file to Android.bp. am: 35ff6fbf69 am: a009ea8c9b
am: c636155e95

Change-Id: Iefd66d254e23e667e662133611bd051507822b8d
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..9da72a0
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,21 @@
+android_app {
+    name: "CallLogBackup",
+    // Only compile source java files in this apk.
+    srcs: ["src/**/*.java"],
+
+    // The Jacoco tool analyzes code coverage when running unit tests on the
+    // application. This configuration line selects which packages will be analyzed,
+    // leaving out code which is tested by other means (e.g. static libraries) that
+    // would dilute the coverage results. These options do not affect regular
+    // production builds.
+    jacoco: {
+        include_filter: ["com.android.calllogbackup.*"],
+    },
+    platform_apis: true,
+    certificate: "shared",
+    privileged: true,
+    optimize: {
+        proguard_flags_files: ["proguard.flags"],
+    },
+
+}
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 0191d87..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := optional
-
-# Only compile source java files in this apk.
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-# The Jacoco tool analyzes code coverage when running unit tests on the
-# application. This configuration line selects which packages will be analyzed,
-# leaving out code which is tested by other means (e.g. static libraries) that
-# would dilute the coverage results. These options do not affect regular
-# production builds.
-LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.calllogbackup.*
-
-LOCAL_PACKAGE_NAME := CallLogBackup
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_CERTIFICATE := shared
-LOCAL_PRIVILEGED_MODULE := true
-
-LOCAL_PROGUARD_FLAG_FILES := proguard.flags
-
-include $(BUILD_PACKAGE)
-
-# Use the following include to make our test apk.
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/Android.bp b/tests/Android.bp
new file mode 100644
index 0000000..a9944dd
--- /dev/null
+++ b/tests/Android.bp
@@ -0,0 +1,16 @@
+android_test {
+    name: "CallLogBackupTests",
+    static_libs: ["mockito-target"],
+    libs: [
+        "android.test.runner",
+        "android.test.base",
+    ],
+    // Only compile source java files in this apk.
+    srcs: ["src/**/*.java"],
+    platform_apis: true,
+    instrumentation_for: "CallLogBackup",
+    certificate: "shared",
+    optimize: {
+        enabled: false,
+    },
+}
diff --git a/tests/Android.mk b/tests/Android.mk
deleted file mode 100644
index 8741795..0000000
--- a/tests/Android.mk
+++ /dev/null
@@ -1,22 +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 := mockito-target
-
-LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base
-
-# Only compile source java files in this apk.
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_PACKAGE_NAME := CallLogBackupTests
-LOCAL_PRIVATE_PLATFORM_APIS := true
-
-LOCAL_INSTRUMENTATION_FOR := CallLogBackup
-LOCAL_CERTIFICATE := shared
-
-LOCAL_PROGUARD_ENABLED := disabled
-
-include $(BUILD_PACKAGE)