Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to control Android Emulator from Gradle

I am looking for Gradle plugin to control Android emulator. Functionality I need from it is:

starting/stopping

install/uninstall

running connected tests

And preferably auto creation and setup (including download if missing) of Emulator images. Basically I want to be able to say inside my build.gradle

emulator{
   image=android-18
   memory=1024
   resolution=x y
   window=yes/no
}

and have Gradle download the original image and set it up like specified.

Is there some plugin that can do things like this?

NOTE:I know that there are CI plugins like this Jenkins one https://wiki.jenkins-ci.org/display/JENKINS/Android+Emulator+Plugin but that is not what I am looking for. I am looking for a pure Gradle solution, which will auto manage emulator state for testing and running the app on developers machines.

like image 875
Igor Čordaš Avatar asked May 04 '16 09:05

Igor Čordaš


1 Answers

I found two plugins:

  • https://github.com/quittle/gradle-android-emulator: looks quite good.
  • https://github.com/gocal/android-emulator-plugin: looks old and deprecated
like image 69
neworld Avatar answered Oct 08 '22 07:10

neworld