Coder Social home page Coder Social logo

gradle-android-command-plugin's Introduction

gradle-android-command-plugin

Bintray

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

gradle-android-command-plugin's People

Contributors

devisnik avatar frankiesardo avatar grujo avatar friedger avatar jszmltr avatar blundell avatar stefanhoth avatar sschuberth avatar xrigau avatar emanuelez avatar ouchadam avatar mr-archano avatar danybony avatar frapontillo avatar arok avatar tasomaniac avatar sebastianengel avatar tobiasheine avatar electryc avatar charroch avatar orrc avatar florianmski avatar

Watchers

Al B. avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.