Skip to content

Commit

Permalink
Fix: Local linking jars not loading, AW remapping on neoforge (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
onebeastchris authored Sep 13, 2024
1 parent 65cd557 commit e816246
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import net.fabricmc.loom.task.RemapJarTask

plugins {
id("floodgate-modded.publish-conventions")
id("architectury-plugin")
Expand Down Expand Up @@ -85,11 +83,17 @@ tasks {
archiveVersion.set("")
}

register("remapModrinthJar", RemapJarTask::class) {
dependsOn(shadowJar)
inputFile.set(shadowJar.get().archiveFile)
archiveVersion.set(versionName(project))
archiveClassifier.set("")
register<Copy>("renameTask") {
dependsOn(remapJar)

val modrinthFileName = "${versionName(project)}.jar"
val libsFile = remapJar.get().destinationDirectory.get().asFile

from(remapJar.get().archiveFile)
rename { modrinthFileName }
into(libsFile)

outputs.file(libsFile.resolve(modrinthFileName))
}

// Readme sync
Expand Down Expand Up @@ -127,7 +131,7 @@ modrinth {

syncBodyFrom.set(rootProject.file("README.md").readText())

uploadFile.set(tasks.getByPath("remapModrinthJar"))
uploadFile.set(tasks.getByPath("renameTask").outputs.files.first())
gameVersions.add(libs.minecraft.get().version as String)
gameVersions.add("1.21.1")
failSilently.set(false)
Expand Down
4 changes: 2 additions & 2 deletions mod/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ dependencies {

afterEvaluate {
// We don't need these
tasks.named("remapModrinthJar").configure {
tasks.named("renameTask").configure {
enabled = false
}

tasks.named("modrinth").configure {
enabled = false
}
}
}

0 comments on commit e816246

Please sign in to comment.