85 lines
2.4 KiB
Groovy
85 lines
2.4 KiB
Groovy
plugins {
|
|
id("xyz.jpenilla.quiet-architectury-loom")
|
|
id 'maven-publish'
|
|
id 'com.gradleup.shadow'
|
|
}
|
|
|
|
configurations.create("libs")
|
|
configurations.shadow {
|
|
extendsFrom(configurations.libs)
|
|
}
|
|
configurations.implementation {
|
|
extendsFrom(configurations.libs)
|
|
}
|
|
|
|
dependencies {
|
|
add('shadow', project([path: ":", configuration: "namedElements"]))
|
|
runtimeOnly(project(":").sourceSets.main.output)
|
|
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
|
|
|
libs("ca.spottedleaf:concurrentutil:${rootProject.concurrentutil_version}")
|
|
libs("org.yaml:snakeyaml:${rootProject.snakeyaml_version}")
|
|
|
|
modImplementation "me.shedaniel.cloth:cloth-config-fabric:${rootProject.cloth_version}"
|
|
include "me.shedaniel.cloth:cloth-config-fabric:${rootProject.cloth_version}"
|
|
modImplementation "com.terraformersmc:modmenu:11.0.1"
|
|
|
|
modImplementation fabricApiLibs.fabric.api
|
|
include fabricApiLibs.command.api.v2
|
|
include fabricApiLibs.base
|
|
}
|
|
|
|
processResources {
|
|
inputs.property "version", project.version
|
|
|
|
filesMatching("fabric.mod.json") {
|
|
expand "version": project.version, "minecraft_version": minecraft_version, "loader_version": loader_version, "mod_version": mod_version
|
|
}
|
|
}
|
|
|
|
shadowJar {
|
|
archiveClassifier = "dev-all"
|
|
destinationDirectory = layout.buildDirectory.dir("libs")
|
|
configurations = [project.configurations.shadow]
|
|
relocate 'ca.spottedleaf.concurrentutil', 'ca.spottedleaf.moonrise.libs.ca.spottedleaf.concurrentutil'
|
|
relocate 'org.yaml.snakeyaml', 'ca.spottedleaf.moonrise.libs.org.yaml.snakeyaml'
|
|
}
|
|
|
|
publishMods {
|
|
modLoaders = ["fabric"]
|
|
|
|
modrinth {
|
|
incompatible(
|
|
"notenoughcrashes",
|
|
"starlight",
|
|
"c2me-fabric"
|
|
)
|
|
}
|
|
curseforge {
|
|
incompatible(
|
|
"not-enough-crashes",
|
|
"starlight",
|
|
"c2me-fabric"
|
|
)
|
|
}
|
|
}
|
|
|
|
// Setup a run with lithium for compatibility testing
|
|
sourceSets.create("lithium")
|
|
configurations.create("lithium")
|
|
loom {
|
|
createRemapConfigurations(sourceSets.lithium)
|
|
runs {
|
|
register("lithiumClient") {
|
|
client()
|
|
property "mixin.debug", "true"
|
|
}
|
|
}
|
|
}
|
|
tasks.named("runLithiumClient", net.fabricmc.loom.task.RunGameTask.class) {
|
|
getClasspath().from(configurations.modRuntimeClasspathLithiumMapped)
|
|
}
|
|
dependencies {
|
|
modLithiumRuntimeOnly "maven.modrinth:lithium:${rootProject.lithium_version}"
|
|
}
|