diff options
author | Paul Duffin <paulduffin@google.com> | 2017-12-08 00:02:43 +0000 |
---|---|---|
committer | Paul Duffin <paulduffin@google.com> | 2017-12-08 00:09:15 +0000 |
commit | 4e1646d3defd99bb956dbfac71a835d3ece5ea17 (patch) | |
tree | f17839fb5b5cc63b6ca4bb58b355a4fd8f6f348d | |
parent | c08d41060f6361ec7cb460f18d312515a8cdeaf8 (diff) | |
download | TvProvider-4e1646d3defd99bb956dbfac71a835d3ece5ea17.tar.gz |
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 TvProviderTests'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 TvProviderTests results
in duplicate classes which leads to build time and compile time
issues.
Bug: 30188076
Test: make checkbuild
Change-Id: I8c8691e3013791099c4263e1f52f0cd550d56094
-rw-r--r-- | tests/Android.mk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/Android.mk b/tests/Android.mk index 450a0b2..1c1478e 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -21,8 +21,8 @@ LOCAL_MODULE_TAGS := tests LOCAL_SRC_FILES := $(call all-java-files-under, src) LOCAL_PACKAGE_NAME := TvProviderTests -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 LOCAL_INSTRUMENTATION_FOR := TvProvider include $(BUILD_PACKAGE) |