MultiLoader-Template/fabric/build.gradle
Jared 531f251168 AccessTransformers and AccessWideners now apply if the file is present
AccessWideners are shared on common and fabric, since you will most likely need them in common anyway, and they are faster to apply than AccessTransformers
2023-06-11 03:33:12 +02:00

62 lines
1.5 KiB
Groovy

plugins {
id 'java'
id 'idea'
id 'maven-publish'
id 'fabric-loom'
}
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 group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1'
implementation project(":common")
}
loom {
if(project(":common").file("src/main/resources/${mod_id}.accesswidener").exists()){
accessWidenerPath.set(project(":common").file("src/main/resources/${mod_id}.accesswidener"))
}
mixin {
defaultRefmapName.set("${mod_id}.refmap.json")
}
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
}
tasks.withType(JavaCompile) {
source(project(":common").sourceSets.main.allSource)
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
maven {
url "file://" + System.getenv("local_maven")
}
}
}