Try to fix dev launch
This commit is contained in:
parent
25ea37e371
commit
67176fa566
|
@ -11,7 +11,7 @@ plugins {
|
|||
val args = extensions.create<JfModuleExtension>("jfModule")
|
||||
|
||||
val isRoot = project == rootProject
|
||||
val rootArgs get() = rootProject.extensions.getByName<JfModExtension>("jfMod");
|
||||
val rootArgs get() = rootProject.extensions.getByName<JfModExtension>("jfMod")
|
||||
|
||||
insertEarlyAfterEvaluate {
|
||||
args.check(project)
|
||||
|
@ -33,18 +33,22 @@ insertEarlyAfterEvaluate {
|
|||
}
|
||||
}
|
||||
|
||||
fun Project.pAfterEvaluate(action: (Project) -> Unit) = afterEvaluate { action(this) }
|
||||
|
||||
afterEvaluate {
|
||||
rootProject.allprojects.forEach { sub ->
|
||||
if (sub != this && rootArgs.isMod(sub)) {
|
||||
loom {
|
||||
mods {
|
||||
register(sub.name) {
|
||||
sourceSet(sub.sourceSets.main.get())
|
||||
sourceSet(sub.sourceSets.client.get())
|
||||
}
|
||||
if (!sourceSets.testmod.get().resources.isEmpty) {
|
||||
register("${sub.name}-testmod") {
|
||||
sourceSet(sub.sourceSets.testmod.get())
|
||||
rootProject.allprojects.forEach {
|
||||
it.pAfterEvaluate { sub ->
|
||||
if (sub != this && rootArgs.isMod(sub)) {
|
||||
loom {
|
||||
mods {
|
||||
register(sub.name) {
|
||||
sourceSet(sub.sourceSets.main.get())
|
||||
sourceSet(sub.sourceSets.client.get())
|
||||
}
|
||||
if (!sourceSets.testmod.get().resources.isEmpty) {
|
||||
register("${sub.name}-testmod") {
|
||||
sourceSet(sub.sourceSets.testmod.get())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue