diff --git a/src/main/kotlin/com/lagradost/cloudstream3/gradle/CloudstreamExtension.kt b/src/main/kotlin/com/lagradost/cloudstream3/gradle/CloudstreamExtension.kt index dc65362..42100b7 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/CloudstreamExtension.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/CloudstreamExtension.kt @@ -16,7 +16,7 @@ abstract class CloudstreamExtension @Inject constructor(project: Project) { var repository: Repo? = null internal set - + var buildBranch: String = "builds" fun overrideUrlPrefix(url: String) { @@ -46,7 +46,7 @@ abstract class CloudstreamExtension @Inject constructor(project: Project) { } fun setRepo(url: String) { var type: String? = null - + var split = when { url.startsWith("https://github.com") -> { type = "github" @@ -69,7 +69,7 @@ abstract class CloudstreamExtension @Inject constructor(project: Project) { .removePrefix("/") .removeSuffix("/") .split("/") - + setRepo(split[0], split[1], type) } diff --git a/src/main/kotlin/com/lagradost/cloudstream3/gradle/Utils.kt b/src/main/kotlin/com/lagradost/cloudstream3/gradle/Utils.kt index f4ed1b2..f4bb27a 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/Utils.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/Utils.kt @@ -11,7 +11,7 @@ fun Project.makeManifest(): PluginManifest { require(extension.pluginClassName != null) { "No plugin class found, make sure your plugin class is annotated with @CloudstreamPlugin" } - + val version = this.version.toString().toIntOrNull(10) if (version == null) { logger.warn("'${project.version}' is not a valid version. Use an integer.") diff --git a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/CompileDexTask.kt b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/CompileDexTask.kt index 068a0dc..fb4e7c0 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/CompileDexTask.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/CompileDexTask.kt @@ -32,7 +32,7 @@ abstract class CompileDexTask : DefaultTask() { @get:OutputFile abstract val pluginClassFile: RegularFileProperty - + @TaskAction fun compileDex() { val android = project.extensions.getByName("android") as BaseExtension 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 64adba4..c78a537 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/DeployWithAdbTask.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/DeployWithAdbTask.kt @@ -40,7 +40,7 @@ abstract class DeployWithAdbTask : DefaultTask() { var file = make.outputs.files.singleFile var path = "/storage/emulated/0/Cloudstream3/plugins/" - + device.push(file, RemoteFile(path + file.name)) val args = arrayListOf("start", "-a", "android.intent.action.VIEW", "-d", "cloudstreamapp:") diff --git a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/MakePluginsJsonTask.kt b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/MakePluginsJsonTask.kt index e9efda4..09b8220 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/MakePluginsJsonTask.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/MakePluginsJsonTask.kt @@ -34,7 +34,7 @@ abstract class MakePluginsJsonTask : DefaultTask() { .build() ).toPrettyString() ) - + logger.lifecycle("Created ${outputFile.asFile.get()}") } } \ No newline at end of file diff --git a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/Tasks.kt b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/Tasks.kt index 53e6cc6..cc51430 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/Tasks.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/Tasks.kt @@ -23,7 +23,7 @@ fun registerTasks(project: Project) { if (project.rootProject.tasks.findByName("makePluginsJson") == null) { project.rootProject.tasks.register("makePluginsJson", MakePluginsJsonTask::class.java) { it.group = TASK_GROUP - + it.outputs.upToDateWhen { false } it.outputFile.set(it.project.buildDir.resolve("plugins.json")) @@ -105,7 +105,7 @@ fun registerTasks(project: Project) { } it.from(compileDexTask.outputFile) - + val zip = it as Zip if (extension.requiresResources) { zip.dependsOn(compileResources.get()) @@ -121,7 +121,7 @@ fun registerTasks(project: Project) { task.logger.lifecycle("Made Cloudstream package at ${task.outputs.files.singleFile}") } } - project.rootProject.tasks.getByName("makePluginsJson").dependsOn(make) + project.rootProject.tasks.getByName("makePluginsJson").dependsOn(make) } project.tasks.register("cleanCache", CleanCacheTask::class.java) {