Allow uploaded artifact file name to be different as distribution file name itself #1623
Replies: 4 comments 1 reply
-
Have you tried using the Here's an example: Lines 463 to 475 in 67838bb Your config could look like artifact {
setPath(layout.buildDirectory.file("distributions/${projectName}-csv-{{projectVersion}}.zip").get().asFile.path)
setTransform("${projectName}-csv.zip")
} |
Beta Was this translation helpful? Give feedback.
-
Ah I see, but I now understand why my IDE was not giving me that option, There seems no |
Beta Was this translation helpful? Give feedback.
-
Ah, that is correct. You must use direct property setter such as |
Beta Was this translation helpful? Give feedback.
-
Oh indeed. Sometimes a bit of puzzling with Gradle-Kotlin.. Thx 🥳 |
Beta Was this translation helpful? Give feedback.
-
I'm currently releasing artifacts to Github like:
It uses the files produced by the Gradle distribution plugin, and as you can see it includes the
{{projectVersion}}
.It would be nice to override the name of the file that is uploaded to the Github releases.
Rationale: I would like to upload files without the
-{{projectVersion}}
part.This so it would be easily to download latest assets from Github using:
www.github.com/my-repo/my-project/releases/latest/download/my-project-name-csv.zip
www.github.com/my-repo/my-project/releases/latest/download/my-project-name-json.zip
The problem is the Gradle distributions plugin always seems to include the vesion in the dist file, so I'm trying other ways to upload it with jreleaser plugin without version in the file name.
Beta Was this translation helpful? Give feedback.
All reactions