Commented, updated, downgraded forge stuff but still to no avail
This commit is contained in:
+3
-2
@@ -2,7 +2,7 @@ plugins {
|
||||
id "java"
|
||||
|
||||
// Plugin to handle dependencies
|
||||
id "com.github.johnrengelman.shadow" version '7.0.0' apply false
|
||||
id "com.github.johnrengelman.shadow" version '7.1.2' apply false
|
||||
|
||||
// Plugin to create merged jars
|
||||
id "io.github.pacifistmc.forgix" version "1.2.6"
|
||||
@@ -352,6 +352,7 @@ allprojects { p ->
|
||||
}
|
||||
|
||||
// Fix forge version numbering system as it is weird
|
||||
// For whatever reason forge uses [1.18, 1.18.1, 1.18.2) instead of the standard ["1.18", "1.18.1", "1.18.2"] which make more sense
|
||||
def compatible_forgemc_versions = "${compatible_minecraft_versions}".replaceAll("\"", "").replaceAll("]", ",)")
|
||||
// System.out.println(compatible_forgemc_versions)
|
||||
|
||||
@@ -374,7 +375,6 @@ allprojects { p ->
|
||||
java_version : java_version
|
||||
]
|
||||
// The left side is what gets replaced in the mod info and the right side is where to get it from in the gradle.properties
|
||||
//TODO: Make Forge loader version also be replaced with non hardcoded value instead of "[36,42)"
|
||||
|
||||
inputs.properties replaceProperties
|
||||
replaceProperties.put 'project', project
|
||||
@@ -424,6 +424,7 @@ allprojects { p ->
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Delete the merged folder when running clean
|
||||
task cleanMergedJars() {
|
||||
def mergedFolder = file("Merged")
|
||||
|
||||
+22
-35
@@ -6,7 +6,8 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath group: "net.minecraftforge.gradle", name: "ForgeGradle", version: "5.1.+", changing: true
|
||||
// classpath group: "net.minecraftforge.gradle", name: "ForgeGradle", version: "5.1.61", changing: true
|
||||
classpath group: "net.minecraftforge.gradle", name: "ForgeGradle", version: "5.1.67", changing: true
|
||||
classpath "org.parchmentmc:librarian:1.+"
|
||||
classpath "org.spongepowered:mixingradle:0.7-SNAPSHOT"
|
||||
}
|
||||
@@ -15,10 +16,9 @@ apply plugin: "net.minecraftforge.gradle"
|
||||
apply plugin: "org.parchmentmc.librarian.forgegradle"
|
||||
apply plugin: "org.spongepowered.mixin"
|
||||
|
||||
// TODO: Check accessWidener works fine
|
||||
|
||||
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||
mixin {
|
||||
add sourceSets.main, "DistantHorizons.refmap.json"
|
||||
add sourceSets.main, "DistantHorizons.refmap.json" // TODO: Create an accessWidener to refmap
|
||||
|
||||
config "DistantHorizons.mixins.json"
|
||||
}
|
||||
@@ -75,13 +75,14 @@ minecraft {
|
||||
}
|
||||
}
|
||||
// TODO: Check if the next 7 lines are necessary
|
||||
sourceSets.main.resources.srcDir "src/generated/resources"
|
||||
minecraft.runs.all {
|
||||
lazyToken('minecraft_classpath') {
|
||||
configurations.library.copyRecursive().resolve().collect { it.absolutePath }.join(File.pathSeparator)
|
||||
configurations.runtimeLibrary.copyRecursive().resolve().collect { it.absolutePath }.join(File.pathSeparator)
|
||||
}
|
||||
}
|
||||
//sourceSets.main.resources.srcDir "src/generated/resources"
|
||||
//minecraft.runs.all {
|
||||
// lazyToken('minecraft_classpath') {
|
||||
// configurations.library.copyRecursive().resolve().collect { it.absolutePath }.join(File.pathSeparator)
|
||||
// configurations.runtimeLibrary.copyRecursive().resolve().collect { it.absolutePath }.join(File.pathSeparator)
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
//loom {
|
||||
// forge {
|
||||
@@ -102,13 +103,13 @@ minecraft.runs.all {
|
||||
//}
|
||||
|
||||
|
||||
|
||||
def addMod(path, enabled) {
|
||||
if (enabled == "2")
|
||||
dependencies { implementation(path) }
|
||||
else if (enabled == "1")
|
||||
dependencies { modCompileOnly(path) }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Forge loader
|
||||
minecraft "net.minecraftforge:forge:${rootProject.minecraft_version}-${rootProject.forge_version}"
|
||||
@@ -122,13 +123,13 @@ dependencies {
|
||||
|
||||
// Starlight
|
||||
addMod("curse.maven:starlight-forge-526854:${rootProject.starlight_version_forge}", rootProject.enable_starlight_forge)
|
||||
annotationProcessor "org.spongepowered:mixin:0.8.4:processor"
|
||||
// annotationProcessor "org.spongepowered:mixin:0.8.4:processor"
|
||||
|
||||
addMod("curse.maven:TerraForged-363820:${rootProject.terraforged_version}", rootProject.enable_terraforged)
|
||||
|
||||
if (System.getProperty("idea.sync.active") != "true") {
|
||||
annotationProcessor "org.spongepowered:mixin:0.8.4:processor"
|
||||
}
|
||||
// if (System.getProperty("idea.sync.active") != "true") {
|
||||
// annotationProcessor "org.spongepowered:mixin:0.8.4:processor"
|
||||
// }
|
||||
|
||||
common(project(path: ":common")) { transitive false }
|
||||
shadowCommon(project(path: ":common")) { transitive false }
|
||||
@@ -175,22 +176,8 @@ sourcesJar {
|
||||
from commonSources.archiveFile.map { zipTree(it) }
|
||||
}
|
||||
|
||||
components.java {
|
||||
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
|
||||
skip()
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenForge(MavenPublication) {
|
||||
artifactId = rootProject.mod_name + "-" + project.name
|
||||
from components.java
|
||||
}
|
||||
}
|
||||
|
||||
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
|
||||
repositories {
|
||||
// Add repositories to publish to here.
|
||||
}
|
||||
}
|
||||
//components.java {
|
||||
// withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
|
||||
// skip()
|
||||
// }
|
||||
//}
|
||||
@@ -1 +0,0 @@
|
||||
loom.platform=forge
|
||||
Reference in New Issue
Block a user