mirror of
https://github.com/Suiranoil/SkinRestorer.git
synced 2026-01-16 04:42:12 +00:00
use moddev gradle for neoforge
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
plugins {
|
plugins {
|
||||||
// see https://fabricmc.net/develop/ for new versions
|
// see https://fabricmc.net/develop/ for new versions
|
||||||
id 'fabric-loom' version '1.10-SNAPSHOT' apply false
|
id 'fabric-loom' version '1.10-SNAPSHOT' apply false
|
||||||
// see https://projects.neoforged.net/neoforged/neogradle for new versions
|
// see https://projects.neoforged.net/neoforged/moddevgradle for new versions
|
||||||
id 'net.neoforged.gradle.userdev' version '7.0.153' apply false
|
id 'net.neoforged.moddev' version '2.0.80' apply false
|
||||||
// see https://files.minecraftforge.net/net/minecraftforge/gradle/ForgeGradle/ for new versions
|
// see https://files.minecraftforge.net/net/minecraftforge/gradle/ForgeGradle/ for new versions
|
||||||
id 'net.minecraftforge.gradle' version '6.0.35' apply false
|
id 'net.minecraftforge.gradle' version '6.0.35' apply false
|
||||||
id 'org.parchmentmc.librarian.forgegradle' version '1.+' apply false
|
id 'org.parchmentmc.librarian.forgegradle' version '1.+' apply false
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ plugins {
|
|||||||
publishMods {
|
publishMods {
|
||||||
if (project.name == 'fabric')
|
if (project.name == 'fabric')
|
||||||
file = remapJar.archiveFile
|
file = remapJar.archiveFile
|
||||||
|
else if (project.name == 'neoforge')
|
||||||
|
file = jar.archiveFile
|
||||||
else
|
else
|
||||||
file = tasks.named('jarJar').get().archiveFile
|
file = tasks.named('jarJar').get().archiveFile
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ minecraft {
|
|||||||
|
|
||||||
runs {
|
runs {
|
||||||
client {
|
client {
|
||||||
workingDirectory file('../run/client')
|
workingDirectory rootProject.file('run/client')
|
||||||
ideaModule "${rootProject.name}.${project.name}.main"
|
ideaModule "${rootProject.name}.${project.name}.main"
|
||||||
taskName 'Client'
|
taskName 'Client'
|
||||||
mods {
|
mods {
|
||||||
@@ -51,7 +51,7 @@ minecraft {
|
|||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
workingDirectory file('../run/server')
|
workingDirectory rootProject.file('run/server')
|
||||||
ideaModule "${rootProject.name}.${project.name}.main"
|
ideaModule "${rootProject.name}.${project.name}.main"
|
||||||
taskName 'Server'
|
taskName 'Server'
|
||||||
mods {
|
mods {
|
||||||
|
|||||||
@@ -3,56 +3,58 @@ plugins {
|
|||||||
id 'idea'
|
id 'idea'
|
||||||
id 'eclipse'
|
id 'eclipse'
|
||||||
|
|
||||||
id 'net.neoforged.gradle.userdev'
|
id 'net.neoforged.moddev'
|
||||||
|
|
||||||
id 'multiloader-publish'
|
id 'multiloader-publish'
|
||||||
}
|
}
|
||||||
|
|
||||||
// Automatically enable neoforge AccessTransformers if the file exists
|
neoForge {
|
||||||
def at = project(':common').file('src/main/resources/META-INF/accesstransformer.cfg')
|
version = neoforge_version
|
||||||
if (at.exists()) {
|
|
||||||
minecraft.accessTransformers.file(at)
|
// Automatically enable neoforge AccessTransformers if the file exists
|
||||||
}
|
def at = project(':common').file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||||
|
if (at.exists()) {
|
||||||
jarJar.enable()
|
minecraft.accessTransformers.file(at)
|
||||||
|
|
||||||
tasks.named('jar') {
|
|
||||||
archiveClassifier = 'thin'
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.named('jarJar') {
|
|
||||||
archiveClassifier = ''
|
|
||||||
}
|
|
||||||
|
|
||||||
jar.finalizedBy('jarJar')
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation "net.neoforged:neoforge:${neoforge_version}"
|
|
||||||
|
|
||||||
implementation(jarJar(group: 'org.mineskin', name: 'java-client', version: mineskin_client_version)) {
|
|
||||||
jarJar.ranged(it, "[${mineskin_client_version},)")
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
subsystems {
|
|
||||||
parchment {
|
parchment {
|
||||||
minecraftVersion = parchment_minecraft
|
minecraftVersion = parchment_minecraft
|
||||||
mappingsVersion = parchment_version
|
mappingsVersion = parchment_version
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
runs {
|
runs {
|
||||||
configureEach {
|
configureEach {
|
||||||
modSource project.sourceSets.main
|
ideName = "NeoForge ${it.name.capitalize()} (${project.path})" // Unify the run config names with fabric
|
||||||
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
|
}
|
||||||
|
|
||||||
|
client {
|
||||||
|
client()
|
||||||
|
gameDirectory = rootProject.file('run/client')
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
server()
|
||||||
|
programArgument '--nogui'
|
||||||
|
gameDirectory = rootProject.file('run/server')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
client {
|
mods {
|
||||||
workingDirectory = file('../run/client')
|
"${mod_id}" {
|
||||||
}
|
sourceSet sourceSets.main
|
||||||
|
}
|
||||||
server {
|
|
||||||
programArgument '--nogui'
|
|
||||||
workingDirectory = file('../run/server')
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation "net.neoforged:neoforge:${neoforge_version}"
|
||||||
|
|
||||||
|
jarJar(implementation('org.mineskin:java-client')) {
|
||||||
|
version {
|
||||||
|
strictly "[${mineskin_client_version},)"
|
||||||
|
prefer mineskin_client_version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
additionalRuntimeClasspath "org.mineskin:java-client:${mineskin_client_version}"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user