add launch task
This commit is contained in:
+10
-3
@@ -1,9 +1,8 @@
|
||||
import java.nio.file.Files
|
||||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
|
||||
import java.util.zip.ZipEntry
|
||||
import java.util.zip.ZipFile
|
||||
import java.util.zip.ZipInputStream
|
||||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
|
||||
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
@@ -149,6 +148,14 @@ task buildAndInstallVTL(type: Exec) {
|
||||
}
|
||||
}
|
||||
|
||||
task buildAndLaunchVTL(type: Exec) {
|
||||
dependsOn('buildAndInstallVTL')
|
||||
if (Os.isFamily("unix") || Os.isFamily("mac"))
|
||||
commandLine 'bash', '-c', 'adb shell monkey -p com.vtosters.lite -c android.intent.category.LAUNCHER 1'
|
||||
else
|
||||
commandLine 'adb', 'shell', 'monkey', '-p', 'com.vtosters.lite', '-c', 'android.intent.category.LAUNCHER', '1'
|
||||
}
|
||||
|
||||
exportDex.dependsOn('assembleRelease')
|
||||
clean.dependsOn('cleanVersionFile')
|
||||
versionFile.dependsOn('cleanVersionFile')
|
||||
|
||||
Reference in New Issue
Block a user