2019-05-05
Support Task Configuration Avoidance from Gradle 5. Thanks to this support, it is now zero overhead to add the Android Command Plugin. Plugin's tasks will not be eagerly configured unless they are explicitly run.
2018-03-21
Fixes a bug that lead to a NullPointerException when executing install
and run
tasks, see this issue.
As a side-effect, deviceId
can not be set via the new DSL. Set it within the command
extension for now.
2018-01-30
- DSL support for main adb wrappers.
- Currently supporting
monkey
,scripts
(#121),demoMode
(#125),install
(#127) andstart
(#130) extensions. - More information can be found in https://github.com/novoda/gradle-android-command-plugin#configuration
- Currently supporting
task
methods in the extension are deprecated. Instead use the provided and documented DSL's to configure custom tasks. With this change,- Generated tasks are more consistent
- usage is nicer-looking thanks to Groovy DSL
sortBySubtasks
is deprecated and not used internally in the plugin.- Tasks are not categorized by variant or simply task names anymore.
- Instead, each provided DSL has more meaningful category.
2017-01-31
- Fix a bug where system animation tasks output a non-actionable warning 6 times. #119
2017-01-11
- Fix a bug where installation error marked as a successful build. #104
- Fixed a bug that caused InstallTask to fail on Nougat devices. #110
- On Nougat devices, errors in
adb shell
commands will now cause the build to fail forwarding the error. #110 - Added a sample showing how to install APKs of all variants in one go. #109
- Monkey task configuration is adjusted to make more sense. #106
Breaking changes in Monkey configuration
Monkey task configuration is adjusted to make more sense. The following adjustments are needed if custom monkey configs are used.
This sample configuration
android {
...
command {
events 1000
categories = ['android.intent.category.ONLY_ME']
}
}
needs to be changed. There are 2 possible options:
- Wrap the parameters with a
monkey
closure. (Notice also that=
aftercategories
is not necessary anymore. Moreover, you now provide multiple categories as a comma separated list.)
android {
...
command {
monkey {
events 1000
categories 'android.intent.category.ONLY_ME'
}
}
}
- If you have a simple configuration, you can also prepend the fields with
monkey
.
android {
...
command {
monkey.events 1000
}
}
- Fix source/target compatibility to Java 1.6
- Task to enable/disable system animations. #96
- Make the "start" task not depend on "install" #83 by Sebastian Schuberth
- Minor formatting / wording improvements #84 by Sebastian Schuberth
- Feature/add task for Activity Stack #85
- Added support to custom flags in install task. #86 by Sergey Chuvashev
- Add keyevent for "home" key #87
- Move activity detection, add memoization #88
- Adds feature to filter monkey by intent category #90
- Refactor Category Filter feature #92
- add support for launching via alias #79 by Sebastian Schuberth
- add Stop and Start task #78 by Sebastian Schuberth
- add Files task to support adb push / pull functionality (see sample project for an example)
- derive adb location from android plugin #70 by Emanuele Zattin
- better exception on missing android plugin #68 by Emanuele Zattin
- allow to specify seed in monkey task #67 by Emanuele Zattin
- fix broken script task on GenyMotion #59 by Eugen Martynov
- update to Gradle 2.2 (via wrapper)
- add an Input task to support basic adb scripting
- add subgrouping of plugin tasks either by variant name or sub task based on a new setting "sortBySubtasks" (defaults to false)
- updated Gradle 2.1 (via wrapper)
- sample app: android-gradle 0.14, making it compatible with Android Studio 0.9+
- added fallback if there is no SDK version available from the device properties
- add descriptions to tasks and group them together (instead of "Other Tasks")
Complete rewrite of the plugin.
Replaced generic ADB command with useful predefined tasks:
installDevice<Variant>
uninstallDevice<Variant>
run<Variant>
monkey<Variant>
- the default number of monkeyrunner events is 10000, change via setting android.eventsclearPreferences<Variant>
See README for examples.