mirror of
https://github.com/Suiranoil/SkinRestorer.git
synced 2026-01-16 04:42:12 +00:00
use neoforge gradle
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
plugins {
|
||||
// see https://fabricmc.net/develop/ for new versions
|
||||
id 'fabric-loom' version '1.7-SNAPSHOT' apply false
|
||||
// see https://projects.neoforged.net/neoforged/moddevgradle for new versions
|
||||
id 'net.neoforged.moddev' version '2.0.1-beta' apply false
|
||||
// see https://projects.neoforged.net/neoforged/neogradle for new versions
|
||||
id 'net.neoforged.gradle.userdev' version '7.0.153' apply false
|
||||
// see https://files.minecraftforge.net/net/minecraftforge/gradle/ForgeGradle/ for new versions
|
||||
id 'net.minecraftforge.gradle' version '6.0.26' apply false
|
||||
id 'org.parchmentmc.librarian.forgegradle' version '1.+' apply false
|
||||
|
||||
id 'org.spongepowered.mixin' version '0.7-SNAPSHOT' apply false
|
||||
|
||||
id 'me.modmuss50.mod-publish-plugin' version '0.6.3' apply false
|
||||
}
|
||||
|
||||
@@ -14,7 +14,22 @@ java {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
// https://docs.gradle.org/current/userguide/declaring_repositories.html#declaring_content_exclusively_found_in_one_repository
|
||||
maven {
|
||||
name = 'ParchmentMC'
|
||||
url = 'https://maven.parchmentmc.org'
|
||||
}
|
||||
maven {
|
||||
name = 'Fabric'
|
||||
url = 'https://maven.fabricmc.net'
|
||||
}
|
||||
maven {
|
||||
name = 'Forge'
|
||||
url = 'https://maven.minecraftforge.net'
|
||||
}
|
||||
maven {
|
||||
name = 'NeoForge'
|
||||
url = 'https://maven.neoforged.net/releases'
|
||||
}
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven {
|
||||
@@ -22,24 +37,9 @@ repositories {
|
||||
url = 'https://repo.spongepowered.org/repository/maven-public'
|
||||
}
|
||||
}
|
||||
filter { includeGroupAndSubgroups('org.spongepowered') }
|
||||
filter {
|
||||
includeGroupAndSubgroups('org.spongepowered')
|
||||
}
|
||||
exclusiveContent {
|
||||
forRepositories(
|
||||
maven {
|
||||
name = 'ParchmentMC'
|
||||
url = 'https://maven.parchmentmc.org/'
|
||||
},
|
||||
maven {
|
||||
name = "NeoForge"
|
||||
url = 'https://maven.neoforged.net/releases'
|
||||
}
|
||||
)
|
||||
filter { includeGroup('org.parchmentmc.data') }
|
||||
}
|
||||
maven {
|
||||
name = 'BlameJared'
|
||||
url = 'https://maven.blamejared.com'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
plugins {
|
||||
id 'multiloader-common'
|
||||
|
||||
id 'fabric-loom'
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
plugins {
|
||||
id 'multiloader-loader'
|
||||
|
||||
id 'fabric-loom'
|
||||
|
||||
id 'multiloader-publish'
|
||||
|
||||
@@ -2,9 +2,10 @@ 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 'org.parchmentmc.librarian.forgegradle'
|
||||
id 'org.spongepowered.mixin'
|
||||
|
||||
id 'multiloader-publish'
|
||||
}
|
||||
@@ -24,7 +25,7 @@ minecraft {
|
||||
// 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')
|
||||
def at = project(':common').file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||
if (at.exists()) {
|
||||
accessTransformer = at
|
||||
}
|
||||
|
||||
@@ -1,43 +1,42 @@
|
||||
plugins {
|
||||
id 'multiloader-loader'
|
||||
id 'net.neoforged.moddev'
|
||||
id 'idea'
|
||||
id 'eclipse'
|
||||
|
||||
id 'net.neoforged.gradle.userdev'
|
||||
|
||||
id 'multiloader-publish'
|
||||
}
|
||||
|
||||
neoForge {
|
||||
version = neoforge_version
|
||||
// Automatically enable neoforge AccessTransformers if the file exists
|
||||
def at = project(':common').file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||
if (at.exists()) {
|
||||
accessTransformers.add(at.absolutePath)
|
||||
}
|
||||
// Automatically enable neoforge AccessTransformers if the file exists
|
||||
def at = project(':common').file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||
if (at.exists()) {
|
||||
minecraft.accessTransformers.file(at)
|
||||
}
|
||||
|
||||
subsystems {
|
||||
parchment {
|
||||
minecraftVersion = parchment_minecraft
|
||||
mappingsVersion = parchment_version
|
||||
}
|
||||
}
|
||||
|
||||
runs {
|
||||
runs {
|
||||
configureEach {
|
||||
systemProperty('neoforge.enabledGameTestNamespaces', mod_id)
|
||||
ideName = "NeoForge ${it.name.capitalize()} (${project.path})" // Unify the run config names with fabric
|
||||
modSource project.sourceSets.main
|
||||
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
|
||||
}
|
||||
|
||||
client {
|
||||
client()
|
||||
gameDirectory = file('../run/client')
|
||||
workingDirectory = file('../run/client')
|
||||
}
|
||||
|
||||
server {
|
||||
server()
|
||||
gameDirectory = file('../run/server')
|
||||
}
|
||||
}
|
||||
|
||||
mods {
|
||||
"${mod_id}" {
|
||||
sourceSet sourceSets.main
|
||||
}
|
||||
programArgument '--nogui'
|
||||
workingDirectory = file('../run/server')
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "net.neoforged:neoforge:${neoforge_version}"
|
||||
}
|
||||
|
||||
@@ -6,45 +6,57 @@ pluginManagement {
|
||||
forRepository {
|
||||
maven {
|
||||
name = 'Fabric'
|
||||
url = uri('https://maven.fabricmc.net')
|
||||
url = 'https://maven.fabricmc.net'
|
||||
}
|
||||
}
|
||||
filter {
|
||||
includeGroup('net.fabricmc')
|
||||
includeGroup('fabric-loom')
|
||||
includeGroupAndSubgroups('net.fabricmc')
|
||||
includeGroupAndSubgroups('fabric-loom')
|
||||
}
|
||||
}
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven {
|
||||
name = 'Forge'
|
||||
url = uri("https://maven.minecraftforge.net")
|
||||
url = 'https://maven.minecraftforge.net'
|
||||
}
|
||||
}
|
||||
filter {
|
||||
includeGroupAndSubgroups("net.minecraftforge")
|
||||
includeGroupAndSubgroups('net.minecraftforge')
|
||||
}
|
||||
}
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven {
|
||||
name = 'Sponge Snapshots'
|
||||
url = uri("https://repo.spongepowered.org/repository/maven-public")
|
||||
name = 'NeoForge'
|
||||
url = 'https://maven.neoforged.net/releases'
|
||||
}
|
||||
}
|
||||
filter {
|
||||
includeGroupAndSubgroups("org.spongepowered")
|
||||
includeGroupAndSubgroups('net.neoforged')
|
||||
includeGroupAndSubgroups('codechicken')
|
||||
}
|
||||
}
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven {
|
||||
name = 'Sponge'
|
||||
url = 'https://repo.spongepowered.org/repository/maven-public'
|
||||
}
|
||||
}
|
||||
filter {
|
||||
includeGroupAndSubgroups('org.spongepowered')
|
||||
}
|
||||
}
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
maven {
|
||||
name = 'ParchmentMC'
|
||||
url = uri("https://maven.parchmentmc.org")
|
||||
url = 'https://maven.parchmentmc.org'
|
||||
}
|
||||
}
|
||||
filter {
|
||||
includeGroupAndSubgroups("org.parchmentmc")
|
||||
includeGroupAndSubgroups('org.parchmentmc')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user