Split sources
This commit is contained in:
parent
074627c5bf
commit
42128493b4
23
jfmod.gradle
23
jfmod.gradle
|
@ -160,10 +160,18 @@ allprojects {
|
|||
group = project.maven_group
|
||||
version = "$rootProject.ext.currentVer"
|
||||
|
||||
loom {
|
||||
runtimeOnlyLog4j = true
|
||||
splitEnvironmentSourceSets()
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
testmod {
|
||||
compileClasspath += main.compileClasspath
|
||||
runtimeClasspath += main.runtimeClasspath
|
||||
|
||||
compileClasspath += client.compileClasspath
|
||||
runtimeClasspath += client.runtimeClasspath
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -173,10 +181,7 @@ allprojects {
|
|||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
|
||||
testmodImplementation sourceSets.main.output
|
||||
}
|
||||
|
||||
loom {
|
||||
runtimeOnlyLog4j = true
|
||||
testmodImplementation sourceSets.client.output
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
@ -241,6 +246,7 @@ allprojects {
|
|||
project.rootProject.allprojects.each { sub ->
|
||||
loom.mods.register(sub.name, {
|
||||
sourceSet sub.sourceSets.main
|
||||
sourceSet sub.sourceSets.client
|
||||
})
|
||||
loom.mods.register(sub.name + "-testmod", {
|
||||
sourceSet sub.sourceSets.testmod
|
||||
|
@ -264,7 +270,7 @@ allprojects {
|
|||
}
|
||||
build.dependsOn remapMavenJar
|
||||
|
||||
task testmodJar(type: Jar) {
|
||||
task testmodJar(type: Jar) { //TODO include deps
|
||||
from sourceSets.testmod.output
|
||||
destinationDirectory = new File(project.buildDir, "devlibs")
|
||||
archiveClassifier = "testmod"
|
||||
|
@ -314,8 +320,10 @@ subprojects {
|
|||
javadoc.enabled = false
|
||||
|
||||
afterEvaluate {
|
||||
genSources.enabled = false
|
||||
unpickJar.enabled = false
|
||||
genClientOnlySources.enabled = false
|
||||
genCommonSources.enabled = false
|
||||
unpickClientOnlyJar.enabled = false
|
||||
unpickCommonJar.enabled = false
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
@ -350,6 +358,7 @@ dependencies {
|
|||
afterEvaluate {
|
||||
subprojects.each {
|
||||
api project(path: it.path, configuration: "shadow")
|
||||
clientImplementation it.sourceSets.client.output
|
||||
|
||||
if (!project.hasProperty("dev_only_module") || !(it.name in project.getProperty("dev_only_module").split(", "))) {
|
||||
include it
|
||||
|
|
Loading…
Reference in New Issue