I need a Gradle task to do a simple upload of an output file onto a URL, no metadata, no module shenanigans.
I’ve been reading through Gradle publication documentation and it really doesn’t seem to be geared to handle a simple case of uploading files to a simple repository such as FTP or an HTTP PUT to a Nexus raw repo.
What is an idiomatic way to address this? Is the publication framework actually an overkill so that I’d be better off coding out my own simple Task? I’ve even struggled to find a modern, “standard” Gradle http plugin. All I found was old unmaintained or decommissioned plugins.
I’m not aware of any built-in way to “just upload a file”.
The existing publishing plugins (maven-publish and ivy-publish) always generate the according metadata file and checksums even if you only configure an explicit artifact without associated metadata.
And as far as I remember the publishing infrastructure is also not extensible properly by 3rd party plugins.
So I think your only chances are to find a plugin that does what you want, or write an own task that just uses some JVM library that can do FTP, or use the built-in Java httpclient for HTTP and so on.
But searching for example for ftp in the plugin central shows at least one plugin released 2 months ago latest and I’m sure there are also http upload plugins but I tried neither of those so cannot say anything about their quality.