Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6097c6f8 authored by Paul Duffin's avatar Paul Duffin
Browse files

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/telephonytests/Android.mk
    Added 'android.test.base' and 'android.test.mock' to
    LOCAL_JAVA_LIBRARIES because FrameworksTelephonyTests'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
    FrameworksTelephonyTests results in duplicate classes which leads
    to build time and compile time issues.

Bug: 30188076
Test: make checkbuild
Change-Id: I6b43f94270d4698f96fd6c912265f9fe9ee4ed09
parent 76b9a078
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -7,13 +7,20 @@ LOCAL_SRC_FILES := $(call all-subdir-java-files)

#LOCAL_STATIC_JAVA_LIBRARIES := librilproto-java

LOCAL_JAVA_LIBRARIES := android.test.runner telephony-common ims-common services.core bouncycastle
LOCAL_JAVA_LIBRARIES := \
    android.test.runner \
    telephony-common \
    ims-common \
    services.core \
    bouncycastle \
    android.test.base \
    android.test.mock \

LOCAL_STATIC_JAVA_LIBRARIES := guava \
                               frameworks-base-testutils \
                               mockito-target-minus-junit4 \
                               android-support-test \
                               platform-test-annotations \
                               legacy-android-test
                               platform-test-annotations

LOCAL_PACKAGE_NAME := FrameworksTelephonyTests