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 args = extensions.create<JfModuleExtension>("jfModule")
|
||||||
|
|
||||||
val isRoot = project == rootProject
|
val isRoot = project == rootProject
|
||||||
val rootArgs get() = rootProject.extensions.getByName<JfModExtension>("jfMod");
|
val rootArgs get() = rootProject.extensions.getByName<JfModExtension>("jfMod")
|
||||||
|
|
||||||
insertEarlyAfterEvaluate {
|
insertEarlyAfterEvaluate {
|
||||||
args.check(project)
|
args.check(project)
|
||||||
|
@ -33,18 +33,22 @@ insertEarlyAfterEvaluate {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun Project.pAfterEvaluate(action: (Project) -> Unit) = afterEvaluate { action(this) }
|
||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
rootProject.allprojects.forEach { sub ->
|
rootProject.allprojects.forEach {
|
||||||
if (sub != this && rootArgs.isMod(sub)) {
|
it.pAfterEvaluate { sub ->
|
||||||
loom {
|
if (sub != this && rootArgs.isMod(sub)) {
|
||||||
mods {
|
loom {
|
||||||
register(sub.name) {
|
mods {
|
||||||
sourceSet(sub.sourceSets.main.get())
|
register(sub.name) {
|
||||||
sourceSet(sub.sourceSets.client.get())
|
sourceSet(sub.sourceSets.main.get())
|
||||||
}
|
sourceSet(sub.sourceSets.client.get())
|
||||||
if (!sourceSets.testmod.get().resources.isEmpty) {
|
}
|
||||||
register("${sub.name}-testmod") {
|
if (!sourceSets.testmod.get().resources.isEmpty) {
|
||||||
sourceSet(sub.sourceSets.testmod.get())
|
register("${sub.name}-testmod") {
|
||||||
|
sourceSet(sub.sourceSets.testmod.get())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue