Skip to content

Commit

Permalink
Try to fix Forge publication.
Browse files Browse the repository at this point in the history
  • Loading branch information
Crystal-Spider committed Jan 17, 2025
1 parent 3766122 commit 41291fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.7"
id "com.hypherionmc.modutils.modpublisher" version "2.1.4" apply false
id "fabric-loom" version "1.5-SNAPSHOT" apply false
id "net.minecraftforge.gradle" version "[6.0,6.2)" apply false
}

sonar {
Expand All @@ -18,6 +19,7 @@ sonar {
subprojects { subproject ->
def noPublish = subproject.name === "common"
def isFabric = subproject.name == "fabric"
def isForge = subproject.name == "forge"

apply plugin: "java"
apply plugin: "idea"
Expand All @@ -27,6 +29,9 @@ subprojects { subproject ->
if (isFabric) {
apply plugin: "fabric-loom"
}
if (isForge) {
apply plugin: "net.minecraftforge.gradle"
}

java.toolchain.languageVersion = JavaLanguageVersion.of(17)
java.withSourcesJar()
Expand Down Expand Up @@ -187,7 +192,7 @@ subprojects { subproject ->
setVersion(mod_version)
setChangelog(changelog_body)
setVersionType(version_type)
setArtifact(isFabric ? remapJar : jar)
setArtifact(isFabric ? remapJar : isForge ? project.tasks.jarJar : jar)
setDisableMalwareScanner(true) // Disable the built in Fractureizer scanner.
setDisableEmptyJarCheck(true) // Disable check for valid mod metadata entry in artifact, which could possibly mean that the jar is empty.
setModrinthID(mod_id_kebab)
Expand Down
2 changes: 1 addition & 1 deletion forge/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import net.minecraftforge.gradle.userdev.tasks.JarJar

plugins {
id "net.minecraftforge.gradle" version "[6.0,6.2)"
id "org.spongepowered.mixin" version "0.7-SNAPSHOT"
}

Expand Down Expand Up @@ -117,6 +116,7 @@ publishing {
publications {
gpr(MavenPublication) {
fg.component(it)
artifact project.tasks.jarJar
}
}
}

0 comments on commit 41291fa

Please sign in to comment.