summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2017-12-08 00:02:43 +0000
committerPaul Duffin <paulduffin@google.com>2017-12-08 23:43:33 +0000
commit02b2eeec9427ea7f3b8d57d2fb8bc475d05fff8e (patch)
treec767ad906dbdc07c9a14428cc1dd494415324bbd
parentdb3f0000493ee94aa58731e75a00ba082b22406c (diff)
downloadandroid_packages_providers_DownloadProvider-02b2eeec9427ea7f3b8d57d2fb8bc475d05fff8e.tar.gz
android_packages_providers_DownloadProvider-02b2eeec9427ea7f3b8d57d2fb8bc475d05fff8e.tar.bz2
android_packages_providers_DownloadProvider-02b2eeec9427ea7f3b8d57d2fb8bc475d05fff8e.zip
Stop statically including legacy-android-test
Statically including legacy-android-test leads to duplicate classes which causes build time problems (with Proguard) and runtime problems on older SDK versions. This change: * Stops statically including legacy-android-test. * Adds compile time dependencies on andoid.test.base, android.test.mock and android.test.runner where necessary. * Adds <uses-library android:name="android.test.runner"/> to any affected package to ensure that the classes that were included by legacy-android-test are still available at runtime. That also adds a dependency on android.test.base and android.test.mock. The following change descriptions were generated automatically and so may be a little repetitive. They are provided to give the reviewer enough information to check the comments match what has actually been changed and check the reasoning behind the changes. * tests/Android.mk Added 'android.test.base' and 'android.test.mock' to LOCAL_JAVA_LIBRARIES because DownloadProviderTests's source depends on their classes and because of these changes they are no longer present on the compilation path. Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES because statically including the classes in DownloadProviderTests results in duplicate classes which leads to build time and compile time issues. * tests/permission/Android.mk Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because DownloadProviderPermissionTests's source depends on its classes and because of these changes they are no longer present on the compilation path. Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES because statically including the classes in DownloadProviderPermissionTests results in duplicate classes which leads to build time and compile time issues. * tests/public_api_access/Android.mk Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because DownloadPublicApiAccessTests's source depends on its classes and because of these changes they are no longer present on the compilation path. Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES because statically including the classes in DownloadPublicApiAccessTests results in duplicate classes which leads to build time and compile time issues. Bug: 30188076 Test: make checkbuild Change-Id: I5120c8944fee3cf34e375ffbe988c12771d6cff2
-rw-r--r--tests/Android.mk5
-rw-r--r--tests/permission/Android.mk4
-rw-r--r--tests/public_api_access/Android.mk4
3 files changed, 6 insertions, 7 deletions
diff --git a/tests/Android.mk b/tests/Android.mk
index b654e12c..b5398e68 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -7,11 +7,10 @@ LOCAL_MODULE_TAGS := tests
# Include all test java files.
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_INSTRUMENTATION_FOR := DownloadProvider
-LOCAL_JAVA_LIBRARIES := android.test.runner
+LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base android.test.mock
LOCAL_STATIC_JAVA_LIBRARIES := \
mockwebserver \
- mockito-target \
- legacy-android-test
+ mockito-target
LOCAL_PACKAGE_NAME := DownloadProviderTests
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_CERTIFICATE := media
diff --git a/tests/permission/Android.mk b/tests/permission/Android.mk
index 62f4d024..2e501165 100644
--- a/tests/permission/Android.mk
+++ b/tests/permission/Android.mk
@@ -7,8 +7,8 @@ LOCAL_MODULE_TAGS := tests
# Include all test java files.
LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_JAVA_LIBRARIES := android.test.runner
-LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
+LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base
+LOCAL_STATIC_JAVA_LIBRARIES := junit
LOCAL_PACKAGE_NAME := DownloadProviderPermissionTests
include $(BUILD_PACKAGE)
diff --git a/tests/public_api_access/Android.mk b/tests/public_api_access/Android.mk
index 66f2f101..908b76e4 100644
--- a/tests/public_api_access/Android.mk
+++ b/tests/public_api_access/Android.mk
@@ -7,8 +7,8 @@ LOCAL_MODULE_TAGS := tests
# Include all test java files.
LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_JAVA_LIBRARIES := android.test.runner
-LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
+LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base
+LOCAL_STATIC_JAVA_LIBRARIES := junit
LOCAL_PACKAGE_NAME := DownloadPublicApiAccessTests
include $(BUILD_PACKAGE)