final try

This commit is contained in:
Cloudburst 2022-08-19 16:43:06 +02:00 committed by GitHub
parent a9f1ef0fbb
commit 1e0b457503
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,16 +24,6 @@ fun registerTasks(project: Project) {
project.rootProject.tasks.register("makePluginsJson", MakePluginsJsonTask::class.java) { project.rootProject.tasks.register("makePluginsJson", MakePluginsJsonTask::class.java) {
it.group = TASK_GROUP it.group = TASK_GROUP
for (subproject in project.allprojects) {
subproject.extensions.findCloudstream() ?: continue
val makeTask = subproject.tasks.findByName("make")
if (makeTask != null) {
it.dependsOn(makeTask)
}
}
it.outputs.upToDateWhen { false } it.outputs.upToDateWhen { false }
it.outputFile.set(it.project.buildDir.resolve("plugins.json")) it.outputFile.set(it.project.buildDir.resolve("plugins.json"))
@ -92,7 +82,7 @@ fun registerTasks(project: Project) {
} }
project.afterEvaluate { project.afterEvaluate {
project.tasks.register("make", Zip::class.java) { val make = project.tasks.register("make", Zip::class.java) {
val compileDexTask = compileDex.get() val compileDexTask = compileDex.get()
it.dependsOn(compileDexTask) it.dependsOn(compileDexTask)
@ -131,6 +121,7 @@ fun registerTasks(project: Project) {
task.logger.lifecycle("Made Cloudstream package at ${task.outputs.files.singleFile}") task.logger.lifecycle("Made Cloudstream package at ${task.outputs.files.singleFile}")
} }
} }
project.rootProject.tasks.getByName("makePluginsJson").dependsOn(make)
} }
project.tasks.register("cleanCache", CleanCacheTask::class.java) { project.tasks.register("cleanCache", CleanCacheTask::class.java) {