From 819b0efaf0f95814f34fcb54f7c9cf13bdf683f9 Mon Sep 17 00:00:00 2001 From: Cloudburst <18114966+C10udburst@users.noreply.github.com> Date: Thu, 4 Aug 2022 16:01:27 +0200 Subject: [PATCH] Update DeployWithAdbTask.kt --- .../gradle/tasks/DeployWithAdbTask.kt | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/DeployWithAdbTask.kt b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/DeployWithAdbTask.kt index df7a85b..eef7e96 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/DeployWithAdbTask.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/DeployWithAdbTask.kt @@ -40,27 +40,24 @@ abstract class DeployWithAdbTask : DefaultTask() { var file = make.outputs.files.singleFile - var path = "/storage/emulated/0/Cloudstream3/plugins/" device.push(file, RemoteFile(path + file.name)) - if (extension.projectType.get() != ProjectType.INJECTOR) { - val args = arrayListOf("start", "-S", "-n", "com.lagradost.cloudstream3.debug/com.lagradost.cloudstream3.MainActivity") + val args = arrayListOf("start", "-S", "-n", "com.lagradost.cloudstream3.debug/com.lagradost.cloudstream3.MainActivity") - if (waitForDebugger) { - args.add("-D") - } + if (waitForDebugger) { + args.add("-D") + } - val response = String( - device.executeShell("am", *args.toTypedArray()).readAllBytes(), StandardCharsets.UTF_8 - ) + val response = String( + device.executeShell("am", *args.toTypedArray()).readAllBytes(), StandardCharsets.UTF_8 + ) - if (response.contains("Error")) { - logger.error(response) - } + if (response.contains("Error")) { + logger.error(response) } logger.lifecycle("Deployed $file to ${device.serial}") } -} \ No newline at end of file +}