Commented, updated, downgraded forge stuff but still to no avail

This commit is contained in:
coolGi
2023-02-24 19:10:11 +10:30
parent 981d9a095d
commit f50cfab3f7
3 changed files with 25 additions and 38 deletions
+22 -35
View File
@@ -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()
// }
//}