1
0
mirror of https://github.com/Suiranoil/SkinRestorer.git synced 2026-01-16 04:42:12 +00:00
Files
SkinRestorer/forge/build.gradle
2026-01-10 14:55:31 +03:00

99 lines
2.9 KiB
Groovy

plugins {
id 'multiloader-loader'
id 'idea'
id 'eclipse'
id 'net.minecraftforge.gradle'
id 'org.parchmentmc.librarian.forgegradle'
id 'org.spongepowered.mixin'
id 'multiloader-publish'
}
mixin {
add sourceSets.main, "${mod_id}.refmap.json"
config "${mod_id}.mixins.json"
}
jarJar.enable()
tasks.named('jarJar') {
archiveClassifier = ''
}
jar.finalizedBy('jarJar')
minecraft {
mappings channel: 'parchment', version: "${parchment_minecraft}-${parchment_version}-${minecraft_version}"
copyIdeResources = true //Calls processResources when in dev
reobf = false // Forge 1.20.6+ uses official mappings at runtime, so we shouldn't reobf from official to SRG
// Automatically enable forge AccessTransformers if the file exists
// This location is hardcoded in Forge and can not be changed.
// https://github.com/MinecraftForge/MinecraftForge/blob/be1698bb1554f9c8fa2f58e32b9ab70bc4385e60/fmlloader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/ModFile.java#L123
def at = project(":common").file('src/main/resources/META-INF/accesstransformer.cfg')
if (at.exists()) {
accessTransformer = at
}
runs {
client {
workingDirectory rootProject.file('run/client')
ideaModule "${rootProject.name}.${project.name}.main"
taskName 'Client'
property 'eventbus.api.strictRuntimeChecks', 'true'
mods {
modClientRun {
source sourceSets.main
}
}
}
server {
workingDirectory rootProject.file('run/server')
ideaModule "${rootProject.name}.${project.name}.main"
taskName 'Server'
property 'eventbus.api.strictRuntimeChecks', 'true'
mods {
modServerRun {
source sourceSets.main
}
}
}
}
}
dependencies {
minecraft "net.minecraftforge:forge:${forge_minecraft_version}-${forge_version}"
annotationProcessor('net.minecraftforge:eventbus-validator:7.0-beta.7')
annotationProcessor('org.spongepowered:mixin:0.8.5-SNAPSHOT:processor')
implementation('net.sf.jopt-simple:jopt-simple:5.0.4') { version { strictly '5.0.4' } }
minecraftLibrary(jarJar(group: 'org.mineskin', name: 'java-client', version: mineskin_client_version)) {
jarJar.ranged(it, "[${mineskin_client_version},)")
}
}
// for some reason mixin plugin does not add 'MixinConfigs' to MANIFEST.MF so we do it manually
jar {
manifest {
attributes([
'MixinConfigs': "${mod_id}.mixins.json"
])
}
}
sourceSets.each {
def dir = layout.buildDirectory.dir("sourcesSets/$it.name")
it.output.resourcesDir = dir
it.java.destinationDirectory = dir
}
tasks.named('processResources') {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}