mirror of
https://github.com/Suiranoil/SkinRestorer.git
synced 2026-01-16 04:42:12 +00:00
78 lines
2.3 KiB
Groovy
78 lines
2.3 KiB
Groovy
plugins {
|
|
id 'multiloader-loader'
|
|
id 'idea'
|
|
id 'eclipse'
|
|
id 'net.minecraftforge.gradle'
|
|
id 'org.spongepowered.mixin' version '0.7-SNAPSHOT'
|
|
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
|
|
|
|
id 'multiloader-publish'
|
|
}
|
|
|
|
mixin {
|
|
add sourceSets.main, "${mod_id}.refmap.json"
|
|
config "${mod_id}.mixins.json"
|
|
}
|
|
|
|
minecraft {
|
|
mappings channel: 'parchment', version: "${parchment_version}-${parchment_minecraft}"
|
|
|
|
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 = file('src/main/resources/META-INF/accesstransformer.cfg')
|
|
if (at.exists()) {
|
|
accessTransformer = at
|
|
}
|
|
|
|
runs {
|
|
client {
|
|
workingDirectory file('../run/client')
|
|
ideaModule "${rootProject.name}.${project.name}.main"
|
|
taskName 'Client'
|
|
mods {
|
|
modClientRun {
|
|
source sourceSets.main
|
|
}
|
|
}
|
|
}
|
|
|
|
server {
|
|
workingDirectory file('../run/server')
|
|
ideaModule "${rootProject.name}.${project.name}.main"
|
|
taskName 'Server'
|
|
mods {
|
|
modServerRun {
|
|
source sourceSets.main
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
|
|
|
|
annotationProcessor('org.spongepowered:mixin:0.8.5-SNAPSHOT:processor')
|
|
implementation('net.sf.jopt-simple:jopt-simple:5.0.4') { version { strictly '5.0.4' } }
|
|
}
|
|
|
|
// 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
|
|
}
|