summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSasha Smundak <asmundak@google.com>2019-01-08 19:23:51 -0800
committerandroid-build-merger <android-build-merger@google.com>2019-01-08 19:23:51 -0800
commit81dd6d0c5057042dce0273592989c5784b7ecb2a (patch)
treed3dfdd54c777da08585caf9c4a0d90107f444179
parentaac1ee9afca0375371cf4547c1cc6b7e3d24997a (diff)
parentb609f42819bc3356cec9d6f87a2c11934d5ade10 (diff)
downloadBlockedNumberProvider-81dd6d0c5057042dce0273592989c5784b7ecb2a.tar.gz
Convert Android.mk file to Android.bp. am: add3da1d38 am: 29520b3023
am: b609f42819 Change-Id: I44f3e80ed3cb73b2aa91007154bd48ce445a9bc6
-rw-r--r--Android.bp17
-rw-r--r--Android.mk21
-rw-r--r--tests/Android.bp21
-rw-r--r--tests/Android.mk25
4 files changed, 38 insertions, 46 deletions
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..1fab3bc
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,17 @@
+android_app {
+ name: "BlockedNumberProvider",
+
+ // Only compile source java files in this apk.
+ srcs: ["src/**/*.java"],
+ static_libs: [
+ "android-common",
+ "guava",
+ ],
+ jacoco: {
+ include_filter: ["com.android.providers.blockednumber.*"],
+ },
+ platform_apis: true,
+ certificate: "shared",
+ privileged: true,
+
+}
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index e5afdfb..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,21 +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)
-
-LOCAL_STATIC_JAVA_LIBRARIES += android-common guava
-
-LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.providers.blockednumber.*
-
-LOCAL_PACKAGE_NAME := BlockedNumberProvider
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_CERTIFICATE := shared
-LOCAL_PRIVILEGED_MODULE := true
-
-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..e4e57ed
--- /dev/null
+++ b/tests/Android.bp
@@ -0,0 +1,21 @@
+android_test {
+ name: "BlockedNumberProviderTest",
+ static_libs: [
+ "mockito-target-minus-junit4",
+ "android-support-test",
+ ],
+ 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: "BlockedNumberProvider",
+ certificate: "shared",
+ optimize: {
+ enabled: false,
+ },
+}
diff --git a/tests/Android.mk b/tests/Android.mk
deleted file mode 100644
index 379f7b8..0000000
--- a/tests/Android.mk
+++ /dev/null
@@ -1,25 +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-minus-junit4 \
- android-support-test
-
-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 := BlockedNumberProviderTest
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_COMPATIBILITY_SUITE := device-tests
-
-LOCAL_INSTRUMENTATION_FOR := BlockedNumberProvider
-LOCAL_CERTIFICATE := shared
-
-LOCAL_PROGUARD_ENABLED := disabled
-
-include $(BUILD_PACKAGE)