mirror of
https://github.com/recloudstream/gradle.git
synced 2024-08-14 23:56:59 +00:00
i just needed to write this properly and not be lazy
This commit is contained in:
parent
269e597e4e
commit
3810f1a580
2 changed files with 12 additions and 3 deletions
|
@ -20,7 +20,7 @@ abstract class MakePluginsJsonTask : DefaultTask() {
|
||||||
val lst = LinkedList<PluginEntry>()
|
val lst = LinkedList<PluginEntry>()
|
||||||
|
|
||||||
for (subproject in project.allprojects) {
|
for (subproject in project.allprojects) {
|
||||||
val cloudstream = subproject.extensions.findCloudstream() ?: continue
|
subproject.extensions.findCloudstream() ?: continue
|
||||||
|
|
||||||
lst.add(subproject.makePluginEntry())
|
lst.add(subproject.makePluginEntry())
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,8 @@ import org.gradle.api.Project
|
||||||
import org.gradle.api.tasks.AbstractCopyTask
|
import org.gradle.api.tasks.AbstractCopyTask
|
||||||
import org.gradle.api.tasks.bundling.Zip
|
import org.gradle.api.tasks.bundling.Zip
|
||||||
import org.gradle.api.tasks.compile.AbstractCompile
|
import org.gradle.api.tasks.compile.AbstractCompile
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
import com.lagradost.cloudstream3.gradle.findCloudstream
|
||||||
|
|
||||||
const val TASK_GROUP = "cloudstream"
|
const val TASK_GROUP = "cloudstream"
|
||||||
|
|
||||||
|
@ -23,7 +24,15 @@ 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
|
||||||
|
|
||||||
it.mustRunAfter("make")
|
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 }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue