mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-13 20:33:01 +00:00
add gradle stuff to automatically build addons
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package com.dfsek.terra
|
||||
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.withType
|
||||
import org.gradle.language.jvm.tasks.ProcessResources
|
||||
import java.io.File
|
||||
|
||||
|
||||
fun Project.runDir(dir: File) {
|
||||
tasks.withType<ProcessResources> {
|
||||
doFirst {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun Project.configureAddons() {
|
||||
tasks.withType<ProcessResources> {
|
||||
project(":common:addons").subprojects.forEach {
|
||||
it.afterEvaluate {
|
||||
dependsOn(it.tasks.getByName("build")) // Depend on addon JARs
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user