diff options
| author | Paul Duffin <paulduffin@google.com> | 2017-12-08 00:02:41 +0000 |
|---|---|---|
| committer | Paul Duffin <paulduffin@google.com> | 2017-12-12 15:24:57 +0000 |
| commit | aa592fea2764a7d8b80468f5d87b7a6f973d47af (patch) | |
| tree | 3b9ea2c3a7cd50d73702b28bd17c3b32ce19f906 /samples/ApiDemos | |
| parent | 6e294637ac7601486d942cce31957ce3e2db0c1d (diff) | |
| download | android_development-aa592fea2764a7d8b80468f5d87b7a6f973d47af.tar.gz android_development-aa592fea2764a7d8b80468f5d87b7a6f973d47af.tar.bz2 android_development-aa592fea2764a7d8b80468f5d87b7a6f973d47af.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.
* samples/ApiDemos/tests/Android.mk
Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
because statically including the classes in ApiDemosTests results
in duplicate classes which leads to build time and compile time
issues.
* samples/BrokenKeyDerivation/tests/Android.mk
Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
because statically including the classes in
BrokenKeyDerivationTests results in duplicate classes which leads
to build time and compile time issues.
* samples/HelloActivity/tests/Android.mk
Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
because statically including the classes in HelloActivityTests
results in duplicate classes which leads to build time and compile
time issues.
* samples/LunarLander/tests/Android.mk
Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
because statically including the classes in LunarLanderTests
results in duplicate classes which leads to build time and compile
time issues.
* samples/SkeletonApp/tests/Android.mk
Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
because statically including the classes in SkeletonAppTests
results in duplicate classes which leads to build time and compile
time issues.
* samples/Snake/tests/Android.mk
Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
because statically including the classes in SnakeTests results in
duplicate classes which leads to build time and compile time
issues.
* samples/Vault/Android.mk
Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
because statically including the classes in Vault results in
duplicate classes which leads to build time and compile time
issues.
Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
Vault's source depends on its classes and because of these changes
they are no longer present on the compilation path.
* samples/Vault/AndroidManifest.xml
Add uses-library for android.test.runner because otherwise this
change would change the set of files available to Vault at runtime.
Bug: 30188076
Test: make checkbuild
Change-Id: I9f42f9216b7a40f1f139699e9c4df04325d577a1
Diffstat (limited to 'samples/ApiDemos')
| -rw-r--r-- | samples/ApiDemos/tests/Android.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/ApiDemos/tests/Android.mk b/samples/ApiDemos/tests/Android.mk index ed661a002..1e513686d 100644 --- a/samples/ApiDemos/tests/Android.mk +++ b/samples/ApiDemos/tests/Android.mk @@ -6,7 +6,7 @@ LOCAL_MODULE_TAGS := tests LOCAL_JAVA_LIBRARIES := android.test.runner -LOCAL_STATIC_JAVA_LIBRARIES := legacy-android-test junit +LOCAL_STATIC_JAVA_LIBRARIES := junit # Include all test java files. LOCAL_SRC_FILES := $(call all-java-files-under, src) |
