aboutsummaryrefslogtreecommitdiff
path: root/tests/android_car_api_test
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 00:09:19 +0000
commitcb64145c9c2c56a719259abf3aaaa8a4daeaf924 (patch)
treeb6871845411790b028e8f45d544dcf4385a71497 /tests/android_car_api_test
parentd0983a1841fea041341d887d0ff26d18890b41f3 (diff)
downloadCar-cb64145c9c2c56a719259abf3aaaa8a4daeaf924.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. * service/Android.mk Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES because statically including the classes in CarService results in duplicate classes which leads to build time and compile time issues. * service/AndroidManifest.xml Add uses-library for android.test.runner because otherwise this change would change the set of files available to CarService at runtime. * tests/CarDiagnosticVerifier/Android.mk Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES because statically including the classes in CarDiagnosticVerifier results in duplicate classes which leads to build time and compile time issues. * tests/CarDiagnosticVerifier/AndroidManifest.xml Add uses-library for android.test.runner because otherwise this change would change the set of files available to CarDiagnosticVerifier at runtime. * tests/EmbeddedKitchenSinkApp/Android.mk Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES because statically including the classes in EmbeddedKitchenSinkApp results in duplicate classes which leads to build time and compile time issues. It is also unnecessary as EmbeddedKitchenSinkApp targets SDK version 25 which provides all the classes at runtime. * tests/EmbeddedKitchenSinkApp/AndroidManifest.xml Add uses-library for android.test.runner because otherwise this change would change the set of files available to EmbeddedKitchenSinkApp at runtime. * tests/android_car_api_test/Android.mk Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES because statically including the classes in AndroidCarApiTest results in duplicate classes which leads to build time and compile time issues. Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because AndroidCarApiTest's source depends on its classes and because of these changes they are no longer present on the compilation path. * tests/android_support_car_api_test/Android.mk Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES because statically including the classes in AndroidSupportCarApiTest results in duplicate classes which leads to build time and compile time issues. It is also unnecessary as AndroidSupportCarApiTest targets SDK version 23 which provides all the classes at runtime. Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because AndroidSupportCarApiTest's source depends on its classes and because of these changes they are no longer present on the compilation path. * tests/carservice_test/Android.mk Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES because statically including the classes in CarServiceTest results in duplicate classes which leads to build time and compile time issues. Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because CarServiceTest's source depends on its classes and because of these changes they are no longer present on the compilation path. * tests/carservice_unit_test/Android.mk Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because CarServiceUnitTest'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 CarServiceUnitTest results in duplicate classes which leads to build time and compile time issues. * tests/obd2_app/Android.mk Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES because statically including the classes in Obd2App results in duplicate classes which leads to build time and compile time issues. * tests/obd2_app/AndroidManifest.xml Add uses-library for android.test.runner because otherwise this change would change the set of files available to Obd2App at runtime. * tests/usb/AoapHostApp/Android.mk Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES because statically including the classes in AoapHostApp results in duplicate classes which leads to build time and compile time issues. * tests/usb/AoapHostApp/AndroidManifest.xml Add uses-library for android.test.runner because otherwise this change would change the set of files available to AoapHostApp at runtime. Bug: 30188076 Test: make checkbuild Change-Id: I97bfbbfe7587e9e4ba6df2102e96e9ed3868cb90
Diffstat (limited to 'tests/android_car_api_test')
-rw-r--r--tests/android_car_api_test/Android.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/android_car_api_test/Android.mk b/tests/android_car_api_test/Android.mk
index 58a12885c8..0e98a5d184 100644
--- a/tests/android_car_api_test/Android.mk
+++ b/tests/android_car_api_test/Android.mk
@@ -32,12 +32,12 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
LOCAL_PROGUARD_ENABLED := disabled
-LOCAL_STATIC_JAVA_LIBRARIES := junit legacy-android-test
+LOCAL_STATIC_JAVA_LIBRARIES := junit
LOCAL_STATIC_JAVA_LIBRARIES += \
android-support-test \
android.hidl.base-V1.0-java \
android.hardware.automotive.vehicle-V2.0-java \
-LOCAL_JAVA_LIBRARIES := android.car android.test.runner
+LOCAL_JAVA_LIBRARIES := android.car android.test.runner android.test.base
include $(BUILD_PACKAGE)