mirror of
https://github.com/chylex/Better-Controls.git
synced 2025-05-12 13:34:04 +02:00
58 lines
1.1 KiB
Plaintext
58 lines
1.1 KiB
Plaintext
import org.gradle.jvm.tasks.Jar
|
|
|
|
val modId: String by project
|
|
val minecraftVersion: String by project
|
|
val fabricVersion: String by project
|
|
|
|
plugins {
|
|
id("fabric-loom")
|
|
}
|
|
|
|
dependencies {
|
|
minecraft("com.mojang:minecraft:$minecraftVersion")
|
|
modImplementation("net.fabricmc:fabric-loader:$fabricVersion")
|
|
mappings(loom.officialMojangMappings())
|
|
}
|
|
|
|
loom {
|
|
runs {
|
|
val runJvmArgs: Set<String> by project
|
|
|
|
configureEach {
|
|
runDir("../run")
|
|
vmArgs(runJvmArgs)
|
|
ideConfigGenerated(true)
|
|
}
|
|
|
|
named("client") {
|
|
configName = "Fabric Client"
|
|
client()
|
|
}
|
|
|
|
findByName("server")?.let(::remove)
|
|
}
|
|
|
|
mixin {
|
|
defaultRefmapName.set("$modId.refmap.json")
|
|
}
|
|
}
|
|
|
|
tasks.processResources {
|
|
filesMatching("fabric.mod.json") {
|
|
expand(inputs.properties)
|
|
}
|
|
}
|
|
|
|
tasks.jar {
|
|
exclude("com/terraformersmc/modmenu/")
|
|
}
|
|
|
|
tasks.register<Jar>("uncompressedRemapJar") {
|
|
group = "fabric"
|
|
|
|
from(tasks.remapJar.map { it.outputs.files.map(::zipTree) })
|
|
|
|
archiveClassifier.set("uncompressed")
|
|
entryCompression = ZipEntryCompression.STORED // Reduces size of multiloader jar.
|
|
}
|