Gradle, Android. Start some job after success start emulator

android

(Alexei) #1

Gradle task to start Android emulator:

task runAVD(type: Exec) {
  def adbCommand = ["emulator","-avd", "$avd"]
  commandLine adbCommand
  doLast {
    println "Some test text"
  }
}

From command line (example):

gradlew runAVD -Pavd=Nexus_4_0_emulator

And emulator is success start. OK. Text “Some test text” print after emulator was closed. But I need to do some stuff AFTER success start emulator. Is this a possible?