See build/soong/README.md for more information.
Also converts the rest of frameworks/base/tools/streaming_proto.
Bug: 122332340
Test: m checkbuild
Change-Id: I87c500c5464fb1722b4b518d89065f5e1ee29a97
Merged-In: Ieb54feb3902bddfd5a571369fbf50161ae646647
android.test.base/runner/mock libraries are shared libraries that are
built without SDK, but with framework interanl libraries (framework.jar,
etc). Apps or libs that are built with SDK (LOCAL_SDK_VERSION is set)
shouldn't use them, but instead the stubs version of the test framework
libraries, which are built using SDK.
This is because, the build system does not allow a module built with SDK
to depend on another module built without SDK. This has been
exceptionally allowed with warnings, but will soon be errors.
In order to prevent the expected build breakage, direct reference to the
shared libraries are all changed to the stubs libraries.
Note: no one has been using these shared libs statically. So, it is
guaranteed that they won't encounter a problem due to missing
<uses-library name="android.test.runner"/> even after this change.
Bug: 69899800
Test: m -j checkbuild
Change-Id: Ib7e2bbecdc8c9327010aa772e820e9ae84e46518
In preparation for the removal of the non-junit classes in the
android.test.base library from the android.jar this adds a dependency
on android.test.base/stubs to ensure this code will continue to
compile.
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.
* cmds/uiautomator/instrumentation/Android.mk
Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
uiautomator-instrumentation's will need them in order to compile
once its classes are removed from the current SDK on which it
currently depends.
* core/tests/hosttests/test-apps/ExternalSharedPerms/Android.mk
Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
ExternalSharedPermsTestApp's will need them in order to compile
once its classes are removed from the current SDK on which it
currently depends.
* core/tests/hosttests/test-apps/ExternalSharedPermsBT/Android.mk
Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
ExternalSharedPermsBTTestApp's will need them in order to compile
once its classes are removed from the current SDK on which it
currently depends.
* core/tests/hosttests/test-apps/ExternalSharedPermsDiffKey/Android.mk
Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
ExternalSharedPermsDiffKeyTestApp's will need them in order to
compile once its classes are removed from the current SDK on which
it currently depends.
* core/tests/hosttests/test-apps/ExternalSharedPermsFL/Android.mk
Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
ExternalSharedPermsFLTestApp's will need them in order to compile
once its classes are removed from the current SDK on which it
currently depends.
* nfc-extras/tests/Android.mk
Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
NfcExtrasTests's will need them in order to compile once its
classes are removed from the current SDK on which it currently
depends.
* tests/SurfaceComposition/Android.mk
Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
SurfaceComposition's will need them in order to compile once its
classes are removed from the current SDK on which it currently
depends.
* tests/WindowAnimationJank/Android.mk
Added 'android.test.base.stubs' to LOCAL_JAVA_LIBRARIES because
WindowAnimationJank's will need them in order to compile once its
classes are removed from the current SDK on which it currently
depends.
Bug: 30188076
Test: make dist
Change-Id: I92b3ff3e5fede3d8d8ecefb0b2e1ee93c5ca9875
Previous changes statically included legacy-android-test in preparation
for removing android.test.* and junit.* classes from the android.jar.
Unfortunately, that lead to duplicate classes between APKs and the
bootclasspath which caused build problems (Proguard) and also runtime
problems (when targeting and running on older releases).
Switching from statically including the classes to using the runtime
libraries cannot be done in one step because legacy-android-test is
statically included in libraries which are used in many APKs and so
removing it from those libraries requires that all APKs be updated at
once. Doing that atomically across dozens of projects is not practical.
This change modifies APKS that statically include the
legacy-android-test library indirectly.
* If the APK manifest uses the android.test.runner library then the APK
is modified to stop statically including legacy-android-test and
instead build against android.test.base/mock/runner libraries instead.
* Otherwise, the APK statically includes legacy-android-test.
Also, any libraries that statically include are modified to stop
statically including it and if it has source dependencies on the classes
is changed to build against the android.test.base/mock/runner libraries.
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.
* cmds/uiautomator/instrumentation/Android.mk
Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
because uiautomator-instrumentation is not a package so does not
need to statically include the classes
* cmds/uiautomator/library/Android.mk
Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
uiautomator.core has a source dependency on its classes
Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
because uiautomator.core is not a package so does not need to
statically include the classes
* core/tests/BroadcastRadioTests/Android.mk
Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
BroadcastRadioTests's source depends on its classes and because of
these changes they are no longer present on the compilation path.
The classes do not need to be statically included because the
classes will be provided by the runtime, either from the default
bootclasspath or from the android.test.runner library that
BroadcastRadioTests specifies in its manifest.
* core/tests/coretests/Android.mk
Added 'android.test.base' and 'android.test.mock' to
LOCAL_JAVA_LIBRARIES because FrameworksCoreTests's source depends
on their classes and because of these changes they are no longer
present on the compilation path. The classes do not need to be
statically included because the classes will be provided by the
runtime, either from the default bootclasspath or from the
android.test.runner library that FrameworksCoreTests specifies in
its manifest.
* core/tests/featureflagtests/Android.mk
Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
FrameworksCoreFeatureFlagTests's source depends on its classes and
because of these changes they are no longer present on the
compilation path. The classes do not need to be statically included
because the classes will be provided by the runtime, either from
the default bootclasspath or from the android.test.runner library
that FrameworksCoreFeatureFlagTests specifies in its manifest.
* core/tests/systemproperties/Android.mk
Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
FrameworksCoreSystemPropertiesTests's source depends on its classes
and because of these changes they are no longer present on the
compilation path. The classes do not need to be statically included
because the classes will be provided by the runtime, either from
the default bootclasspath or from the android.test.runner library
that FrameworksCoreSystemPropertiesTests specifies in its manifest.
* core/tests/utillib/Android.mk
Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
because frameworks-core-util-lib is not a package so does not need
to statically include the classes
Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
frameworks-core-util-lib has a source dependency on its classes
* core/tests/utiltests/Android.mk
Added 'android.test.base' and 'android.test.mock' to
LOCAL_JAVA_LIBRARIES because FrameworksUtilTests's source depends
on their classes and because of these changes they are no longer
present on the compilation path. The classes do not need to be
statically included because the classes will be provided by the
runtime, either from the default bootclasspath or from the
android.test.runner library that FrameworksUtilTests specifies in
its manifest.
* location/tests/locationtests/Android.mk
Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
FrameworksLocationTests's source depends on its classes and because
of these changes they are no longer present on the compilation
path. The classes do not need to be statically included because the
classes will be provided by the runtime, either from the default
bootclasspath or from the android.test.runner library that
FrameworksLocationTests specifies in its manifest.
* lowpan/tests/Android.mk
Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
FrameworksLowpanApiTests's source depends on its classes and
because of these changes they are no longer present on the
compilation path. The classes do not need to be statically included
because the classes will be provided by the runtime, either from
the default bootclasspath or from the android.test.runner library
that FrameworksLowpanApiTests specifies in its manifest.
* packages/Osu2/tests/Android.mk
Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
OsuTests's source depends on its classes and because of these
changes they are no longer present on the compilation path. The
classes do not need to be statically included because the classes
will be provided by the runtime, either from the default
bootclasspath or from the android.test.runner library that OsuTests
specifies in its manifest.
* packages/SettingsProvider/test/Android.mk
Replaced 'legacy-android-test' with 'android.test.base' in
LOCAL_JAVA_LIBRARIES because SettingsProviderTest's source depends
on its classes. The classes do not need to be statically included
because the classes will be provided by the runtime, either from
the default bootclasspath or from the android.test.runner library
that SettingsProviderTest specifies in its manifest.
* services/tests/notification/Android.mk
Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
FrameworksNotificationTests's source depends on its classes and
because of these changes they are no longer present on the
compilation path. The classes do not need to be statically included
because the classes will be provided by the runtime, either from
the default bootclasspath or from the android.test.runner library
that FrameworksNotificationTests specifies in its manifest.
* services/tests/servicestests/Android.mk
Replaced 'legacy-android-test' with 'android.test.base' and
'android.test.runner' in LOCAL_JAVA_LIBRARIES because
FrameworksServicesTests's source depends on their classes. The
classes do not need to be statically included because the classes
will be provided by the runtime, either from the default
bootclasspath or from the android.test.runner library that
FrameworksServicesTests specifies in its manifest.
* services/tests/shortcutmanagerutils/Android.mk
Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
ShortcutManagerTestUtils has a source dependency on its classes
* tests/AppLaunch/Android.mk
Replaced 'legacy-android-test' with 'android.test.base' and
'android.test.runner' in LOCAL_JAVA_LIBRARIES because AppLaunch's
source depends on their classes. The classes do not need to be
statically included because the classes will be provided by the
runtime, either from the default bootclasspath or from the
android.test.runner library that AppLaunch specifies in its
manifest.
* tests/Camera2Tests/SmartCamera/SimpleCamera/tests/Android.mk
Replaced 'legacy-android-test' with 'android.test.base' in
LOCAL_JAVA_LIBRARIES because SmartCamera-tests's source depends on
its classes. The classes do not need to be statically included
because the classes will be provided by the runtime, either from
the default bootclasspath or from the android.test.runner library
that SmartCamera-tests specifies in its manifest.
* tests/ServiceCrashTest/Android.mk
Replaced 'legacy-android-test' with 'android.test.base' in
LOCAL_JAVA_LIBRARIES because ServiceCrashTest's source depends on
its classes. The classes do not need to be statically included
because the classes will be provided by the runtime, either from
the default bootclasspath or from the android.test.runner library
that ServiceCrashTest specifies in its manifest.
* tests/net/Android.mk
Added 'android.test.base' and 'android.test.mock' to
LOCAL_JAVA_LIBRARIES because FrameworksNetTests's source depends on
their classes and because of these changes they are no longer
present on the compilation path. The classes do not need to be
statically included because the classes will be provided by the
runtime, either from the default bootclasspath or from the
android.test.runner library that FrameworksNetTests specifies in
its manifest.
* tests/testables/Android.mk
Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
because testables is not a package so does not need to statically
include the classes
Added 'android.test.mock' to LOCAL_JAVA_LIBRARIES because testables
has a source dependency on its classes
* tests/utils/testutils/Android.mk
Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
because frameworks-base-testutils is not a package so does not need
to statically include the classes
Added 'android.test.base' and 'android.test.mock' to
LOCAL_JAVA_LIBRARIES because frameworks-base-testutils has a source
dependency on their classes
* wifi/tests/Android.mk
Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
FrameworksWifiApiTests's source depends on its classes and because
of these changes they are no longer present on the compilation
path. The classes do not need to be statically included because the
classes will be provided by the runtime, either from the default
bootclasspath or from the android.test.runner library that
FrameworksWifiApiTests specifies in its manifest.
Bug: 30188076
Test: make checkbuild
Change-Id: Ia6a48234f28e7e1789049cf4b37cd7fe0bc8251c
In preparation for removing junit and android.test classes from
the Android API this change adds explicit dependencies on junit
and/or legacy-android-test to ensure that modules will compile
properly once it is removed.
Care was taken to ensure that any targets that depended,
directly or indirectly, on android-support-test did not also
depend on junit or hamcrest as they conflict with the versions
embedded within android-support-test.
Bug: 30188076
Test: make checkbuild
Change-Id: Ifc3ee3dc804074a3c572bf2600cfb1fe1b6fa749
frameworks/testing/uiautomator -> frameworks/base/cmds/uiautomator
(samples, utils sub folders exlcuded)
frameworks/testing/uiautomator/utils -> frameworks/base/tests/utils
no source files changed, only one line makefile update (for
UI Automator API check)
Bug: 18708851
Change-Id: I396bd386d3d55a52df18af183685daf80caa9f73