127 lines
3.1 KiB
Groovy
127 lines
3.1 KiB
Groovy
plugins {
|
|
id 'fabric-loom' version '0.12-SNAPSHOT'
|
|
id 'maven-publish'
|
|
id 'idea'
|
|
}
|
|
|
|
archivesBaseName = "${mod_name}-fabric-${minecraft_version}"
|
|
|
|
repositories {
|
|
maven { url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven/" }
|
|
}
|
|
|
|
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")
|
|
|
|
modApi("me.hypherionmc.craterlib:CraterLib-fabric-${minecraft_version}:${craterlib_version}") {
|
|
exclude(group: "net.fabricmc.fabric-api")
|
|
}
|
|
|
|
modApi("com.terraformersmc:modmenu:${mod_menu_version}") {
|
|
exclude(group: "net.fabricmc.fabric-api")
|
|
}
|
|
|
|
// Sodium
|
|
/*modImplementation ("curse.maven:sodium-394468:${sodium_version}") {
|
|
exclude(group: "net.fabricmc.fabric-api")
|
|
}
|
|
// This is a dependency of Sodium....
|
|
implementation 'org.joml:joml:1.10.4'*/
|
|
|
|
// Shimmer
|
|
modImplementation ("com.lowdragmc.shimmer:Shimmer-fabric-1.19.1:${shimmer_version}") {
|
|
exclude(group: "net.fabricmc.fabric-api")
|
|
}
|
|
|
|
// The One Probe Fabric
|
|
modCompileOnly("mcjty.theoneprobe:theoneprobe-fabric:${top_fabric}")
|
|
|
|
// WTHIT
|
|
// compile against the API
|
|
modCompileOnly "mcp.mobius.waila:wthit-api:fabric-${wthitVersion}"
|
|
|
|
// run against the full jar
|
|
modRuntimeOnly "mcp.mobius.waila:wthit:fabric-${wthitVersion}"
|
|
modRuntimeOnly "lol.bai:badpackets:fabric-0.2.0"
|
|
}
|
|
|
|
loom {
|
|
accessWidenerPath = project(":Common").file("src/main/resources/hyperlighting.aw")
|
|
runs {
|
|
client {
|
|
client()
|
|
setConfigName("Fabric Client")
|
|
ideConfigGenerated(true)
|
|
runDir("run")
|
|
}
|
|
server {
|
|
server()
|
|
setConfigName("Fabric Server")
|
|
ideConfigGenerated(true)
|
|
runDir("run")
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
processResources {
|
|
from project(":Common").sourceSets.main.resources
|
|
inputs.property "version", project.version
|
|
|
|
filesMatching("fabric.mod.json") {
|
|
expand "version": project.version
|
|
}
|
|
|
|
filesMatching('*.mixins.json') {
|
|
expand "refmap_target": "${archivesBaseName}-"
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile) {
|
|
source(project(":Common").sourceSets.main.allSource)
|
|
}
|
|
|
|
jar {
|
|
from("LICENSE") {
|
|
rename { "${it}_${mod_name}" }
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
groupId project.group
|
|
artifactId project.archivesBaseName
|
|
version project.version
|
|
from components.java
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
url "file://" + System.getenv("local_maven")
|
|
}
|
|
}
|
|
}
|
|
|
|
task delDevJar {
|
|
doLast {
|
|
def tree = fileTree('build/libs')
|
|
tree.include '**/*-dev.jar'
|
|
tree.each { it.delete() }
|
|
}
|
|
}
|
|
build.finalizedBy delDevJar
|
|
|
|
task copyAllArtifacts(type: Copy) {
|
|
from "$buildDir/libs"
|
|
into "$rootDir/artifacts"
|
|
include("*.jar")
|
|
}
|
|
|
|
build.finalizedBy(copyAllArtifacts);
|