From 578f1a22212a3ff2b515ce29ebfef59c9e91ec8b Mon Sep 17 00:00:00 2001 From: Vologhat <47892605+Vologhat@users.noreply.github.com> Date: Fri, 30 Dec 2022 14:28:30 +0300 Subject: [PATCH] add launch task --- app/build.gradle | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index a13d3486f..96a4628b5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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')