mirror of
https://github.com/recloudstream/gradle.git
synced 2024-08-14 23:56:59 +00:00
Update DeployWithAdbTask.kt
This commit is contained in:
parent
8c144273b3
commit
819b0efaf0
1 changed files with 10 additions and 13 deletions
|
@ -40,27 +40,24 @@ abstract class DeployWithAdbTask : DefaultTask() {
|
||||||
|
|
||||||
var file = make.outputs.files.singleFile
|
var file = make.outputs.files.singleFile
|
||||||
|
|
||||||
|
|
||||||
var path = "/storage/emulated/0/Cloudstream3/plugins/"
|
var path = "/storage/emulated/0/Cloudstream3/plugins/"
|
||||||
|
|
||||||
device.push(file, RemoteFile(path + file.name))
|
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) {
|
if (waitForDebugger) {
|
||||||
args.add("-D")
|
args.add("-D")
|
||||||
}
|
}
|
||||||
|
|
||||||
val response = String(
|
val response = String(
|
||||||
device.executeShell("am", *args.toTypedArray()).readAllBytes(), StandardCharsets.UTF_8
|
device.executeShell("am", *args.toTypedArray()).readAllBytes(), StandardCharsets.UTF_8
|
||||||
)
|
)
|
||||||
|
|
||||||
if (response.contains("Error")) {
|
if (response.contains("Error")) {
|
||||||
logger.error(response)
|
logger.error(response)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.lifecycle("Deployed $file to ${device.serial}")
|
logger.lifecycle("Deployed $file to ${device.serial}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue