add launch task

This commit is contained in:
Vologhat
2022-12-30 14:28:30 +03:00
parent 0fb3ff6c53
commit 578f1a2221
+10 -3
View File
@@ -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')