Skip to content

Commit

Permalink
Fix file name issues with chiseledPublishMods
Browse files Browse the repository at this point in the history
  • Loading branch information
PieKing1215 committed Feb 14, 2025
1 parent 70f31a0 commit 84c4182
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions stonecutter.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ subprojects {
if(platproj.name.matches("fabric|forge|neoforge")) {
copy {
from file("build/publishMods/")
into rootProject.file("build/publishMods/${project.name}/${platproj.name}")
def pname = project.name.replaceAll("-${platproj.name}", "")
into rootProject.file("build/publishMods/${pname}/${platproj.name}")
}
// delete "build/publishMods/"
}
Expand All @@ -208,8 +209,9 @@ subprojects {
dependsOn(tasks.named("publishMods"), tasks.named("collectPublish"))
}

def pname = project.name.replaceAll("-${parent.name}", "")
publishMods {
file = rootProject.file("build/libs/${display_name}-${rootProject.version}+${project.name}-${parent.name.replaceAll('f', 'F').replaceAll('n', 'N')}.jar")
file = rootProject.file("build/libs/${display_name}-${rootProject.version}+${pname}-${parent.name.replaceAll('f', 'F').replaceAll('n', 'N')}.jar")
modLoaders.add(parent.name)

changelog = rootProject.publishMods.changelog
Expand All @@ -229,11 +231,11 @@ subprojects {
projectId = modrinth_project

displayName = "$rootProject.version for ${parent.name.replaceAll('f', 'F').replaceAll('n', 'N')} ${get("display_mc_version")}"
version = "$rootProject.version+$project.name-$parent.name"
version = "$rootProject.version+$pname-$parent.name"

minecraftVersionRange {
start = get("minecraft_min")
end = project.name
end = pname
}

requires "cloth-config"
Expand Down

0 comments on commit 84c4182

Please sign in to comment.