PaperMC / paperweight

Gradle build system plugin for Paper and Paper forks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rename jar files?

dkim19375 opened this issue · comments

How do I rename all of the outputs?
I have:

tasks {
    reobfJar {
        outputJar.set(File(buildDir, "libs/NewName-$version.jar"))
    }
    shadowJar {
        archiveBaseName.set("NewName")
        archiveClassifier.set("")
    }
}

but the files in build/libs when doing gradle clean reobfJar are:

NewName-1.0.0.jar
NewName-1.0.0-dev-all.jar
OldName-1.0.0-dev.jar

A workaround is to manually rename, but is there a way to rename automatically?

This is really more a gradle help question than a paperweight issue, but you want to set the archives base name on the BaseExtension base.archivesBaseName.set("BaseName")