Commit 9f27c3c9 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.

* libraries/aupt-lib/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in AuptRunner results in
    duplicate classes which leads to build time and compile time
    issues.

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    AuptRunner's source depends on its classes and because of these
    changes they are no longer present on the compilation path.

* libraries/device-collectors/src/test/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in CollectorDeviceLibTest
    results in duplicate classes which leads to build time and compile
    time issues. It is also unnecessary as CollectorDeviceLibTest
    targets SDK version 26 which provides all the classes at runtime.

* tests/jank/dialer/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in DialerJankTests results
    in duplicate classes which leads to build time and compile time
    issues.

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    DialerJankTests's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

* tests/jank/webview/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in UbWebViewJankTests
    results in duplicate classes which leads to build time and compile
    time issues.

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    UbWebViewJankTests's source depends on its classes and because of
    these changes they are no longer present on the compilation path.

Bug: 30188076
Test: make checkbuild
Change-Id: I94934b064d34cfb36578b039aaf503e4e7b27ea9
parent 471e5d75
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment