MultiLoader-Template/Fabric/build.gradle
2021-10-11 22:38:19 -06:00

74 lines
1.5 KiB
Groovy

plugins {
id 'fabric-loom' version '0.9-SNAPSHOT'
id 'maven-publish'
id 'idea'
}
archivesBaseName = "${mod_name}-fabric-${minecraft_version}"
dependencies {
minecraft "com.mojang:minecraft:${minecraft_version}"
mappings loom.officialMojangMappings()
modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"
implementation project(":Common")
}
loom {
runs {
client {
client()
setConfigName("Fabric Client")
ideConfigGenerated(true)
runDir("${this.name}/run")
}
server {
server()
setConfigName("Fabric Server")
ideConfigGenerated(true)
runDir("${this.name}/run")
}
}
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 16
}
tasks.withType(JavaCompile) {
source(project(":Common").sourceSets.main.allSource)
}
jar {
from("LICENSE") {
rename { "${it}_${mod_name}" }
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
}
}
repositories {
}
}