summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2017-12-11 15:50:05 +0000
committerPaul Duffin <paulduffin@google.com>2017-12-11 21:39:31 +0000
commit1abbb6a6fd44dc42f2955b9191aa32fc31858580 (patch)
treec171d7fcc6eed200d7971413b2dffdc91438eeb1
parent006b7a2b760b89211b9530804118a8333cee314b (diff)
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. * test-runner/tests/Android.mk Added 'android.test.base' and 'android.test.mock' to LOCAL_JAVA_LIBRARIES because FrameworkTestRunnerTests'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 FrameworkTestRunnerTests results in duplicate classes which leads to build time and compile time issues. Bug: 30188076 Test: make checkbuild Change-Id: I52a91fe4f6016de8edf4753fbd2bc4d2e4c9f317
-rw-r--r--test-runner/tests/Android.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/test-runner/tests/Android.mk b/test-runner/tests/Android.mk
index 7ee047e47058..1a4f6d54fed7 100644
--- a/test-runner/tests/Android.mk
+++ b/test-runner/tests/Android.mk
@@ -25,8 +25,8 @@ include $(CLEAR_VARS)
#
LOCAL_MODULE_TAGS := tests
-LOCAL_JAVA_LIBRARIES := android.test.runner
-LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
+LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base android.test.mock
+LOCAL_STATIC_JAVA_LIBRARIES := junit
# Include all test java files.
LOCAL_SRC_FILES := $(call all-java-files-under, src)