77 lines
1.5 KiB
Groovy
77 lines
1.5 KiB
Groovy
plugins {
|
|
id 'fabric-loom' version '0.9-SNAPSHOT'
|
|
id 'maven-publish'
|
|
id 'idea'
|
|
}
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_16
|
|
targetCompatibility = JavaVersion.VERSION_16
|
|
|
|
archivesBaseName = mod_name
|
|
version = "fabric-${minecraft_version}-${mod_version}"
|
|
group = mod_group
|
|
|
|
repositories {
|
|
}
|
|
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
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
|
|
}
|
|
|
|
java {
|
|
withSourcesJar()
|
|
}
|
|
|
|
jar {
|
|
dependsOn ":Common:compileJava"
|
|
from project(":Common").sourceSets.main.output
|
|
from("LICENSE") {
|
|
rename { "${it}_${mod_name}" }
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
artifact(remapJar) {
|
|
builtBy remapJar
|
|
}
|
|
artifact(sourcesJar) {
|
|
builtBy remapSourcesJar
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
}
|
|
}
|