This commit is contained in:
C10udburst 2022-08-04 09:58:18 +02:00
parent e0239f1e4c
commit 0b668b0100
2 changed files with 16 additions and 16 deletions

View file

@ -1,6 +1,6 @@
package com.lagradost.gradle.tasks package com.lagradost.gradle.tasks
import com.cloudstream.gradle.getCloudstream import com.lagradost.gradle.getCloudstream
import jadx.api.JadxArgs import jadx.api.JadxArgs
import jadx.api.JadxDecompiler import jadx.api.JadxDecompiler
import jadx.api.impl.NoOpCodeCache import jadx.api.impl.NoOpCodeCache
@ -13,7 +13,7 @@ import java.util.function.Function
abstract class GenSourcesTask : DefaultTask() { abstract class GenSourcesTask : DefaultTask() {
@TaskAction @TaskAction
fun genSources() { fun genSources() {
val extension = project.extensions.getAliucord() val extension = project.extensions.getCloudstream()
val apkinfo = extension.apkinfo!! val apkinfo = extension.apkinfo!!
val sourcesJarFile = apkinfo.cache.resolve("cloudstream-${apkinfo.version}-sources.jar") val sourcesJarFile = apkinfo.cache.resolve("cloudstream-${apkinfo.version}-sources.jar")

View file

@ -1,6 +1,6 @@
package com.lagradost.gradle.tasks package com.lagradost.gradle.tasks
import com.cloudstream.gradle.getCloudstream import com.lagradost.gradle.getCloudstream
import com.android.build.gradle.BaseExtension import com.android.build.gradle.BaseExtension
import com.android.build.gradle.tasks.ProcessLibraryManifest import com.android.build.gradle.tasks.ProcessLibraryManifest
import groovy.json.JsonBuilder import groovy.json.JsonBuilder
@ -43,21 +43,21 @@ fun registerTasks(project: Project) {
val compileDexTask = compileDex.get() val compileDexTask = compileDex.get()
it.dependsOn(compileDexTask) it.dependsOn(compileDexTask)
it.doFirst { // it.doFirst {
require(project.version != "unspecified") { // require(project.version != "unspecified") {
"No version is set" // "No version is set"
} // }
if (extension.pluginClassName == null) { // if (extension.pluginClassName == null) {
if (pluginClassFile.exists()) { // if (pluginClassFile.exists()) {
extension.pluginClassName = pluginClassFile.readText() // extension.pluginClassName = pluginClassFile.readText()
} // }
} // }
require(extension.pluginClassName != null) { // require(extension.pluginClassName != null) {
"No plugin class found, make sure your plugin class is annotated with @CloudstreamPlugin" // "No plugin class found, make sure your plugin class is annotated with @CloudstreamPlugin"
} // }
} // }
it.from(compileDexTask.outputFile) it.from(compileDexTask.outputFile)
it.into(project.buildDir) it.into(project.buildDir)