gradle-android-command-plugin


Source link: https://github.com/novoda/gradle-android-command-plugin

gradle-android-command-plugin

Use gradle tasks to run specific adb commands.

Description

You can use this plugin to do things such as:

  • Find all devices attached and get basic info about them
  • Select the first one that complies with a custom rule
  • Install a specific APK from the available build types + flavours
  • Clear preferences or do something related to the APK to prepare for tests
  • Run monkey for that specific APK on that specific device
  • Uninstall the APK

This is particularly useful for CI servers but could be used to speed up development as well.

Adding to your project

To start using this library, add these lines to the build.gradle of your project:

apply plugin: 'com.android.application' apply plugin: 'com.novoda.android-command'  buildscript {

  repositories {

jcenter()
  
}

  dependencies {

classpath 'com.novoda:gradle-android-command-plugin:1.7.1'
  
}
 
}

Simple usage

The plugin creates new tasks that you can use:

  • installDevice<Variant> [ com.novoda.gradle.command.InstallDevice] - installs the app on a specific device.
  • uninstallDevice<Variant> [ com.novoda.gradle.command.UninstallDevice] - uninstalls the app from a specific device.
  • run<Variant> [ com.novoda.gradle.command.Run] - installs and launches the app on a specific device.
  • start<Variant> [ com.novoda.gradle.command.Run] - launches the app on a specific device (without installing it).
  • stop<Variant> [ com.novoda.gradle.command.Stop] - Forcibly stops the app on a specific device.
  • monkey<Variant> [ com.novoda.gradle.command.Monkey] - installs and runs monkey on a specific device.
  • clearPrefs<Variant> [ com.novoda.gradle.command.ClearPreferences] - clears app preferences on a specific device.
  • com.novoda.gradle.command.Input - runs input scripts, wrapping adb shell input.
  • com.novoda.gradle.command.Files - enables basic file copy via push and pull, wrapping the respective adb calls.

For advanced usage please take a look into the sample project build.gradle file.

Links

Here are a list of useful links:

  • We always welcome people to contribute new features or bug fixes, here is how
  • For more info on how start working on this project, see this wiki page
  • If you have a problem check the Issues Page first to see if we are working on it
  • For further usage or to delve more deeply checkout the Project Wiki
  • Looking for community help, browse the already asked Stack Overflow Questions or use the tag: support-android-command when posting a new question

Resources

It's a framework for building Android UI in Kotlin code by using the concept of virtual views and reactive data flow, the goal is to reduce boilerplate while retaining the same Android layout constructs.

EasyIntro is the flexible, easy to use, all in one app intro library for your Android project.

A quick adapter library for ListView, GridView, RecyclerView, ViewPager and ExpandableListView on android.

Loading drawable indicators, can be combined with any View as the loading View.

Agera is a set of classes and interfaces to help write functional, asynchronous, and reactive applications for Android.

This library is a set of simple wrapper classes that are aimed to help you easily create fancy material dialogs.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes