bintray / gradle-bintray-plugin

Apache License 2.0
1.28k stars 197 forks source link

Feature Request: allow updating a published version to allow multi-platform releases #321

Open renatoathaydes opened 4 years ago

renatoathaydes commented 4 years ago

I have been trying to setup an auto-updating app which a user can download, then the app itself downloads new updates as they become available.

The app is a Java app, but it's distributed as a native application.

I tried using GitHub Releases for that but it is difficult to make it work on v4 of the API as they require authentication (which users of my app can't do, it's not focussed on developers) and v3 requires multiple calls and lots of JSON back :)

I would use Bintray for this if Bintray supported, like GitHub Releases does, editing an existing release so that different builds (one per platform) can all call ./gradlew uploadToBintray with different assets.

In other words: the build on Windows would publish the Windows-specific asset, the Linux build would publish the Linux-specific asset and so on.

As I understand it, the only way to make it work right now is to publish different versions for each platform, which would be awkard.

Is it possible to achieve this, and if not, would you consider adding this as a new feature?

natario1 commented 4 years ago

Maybe helpful: https://github.com/natario1/MavenPublisher you can do multiplatform releases like so:

publisher {
    // configure common stuff
    bintray("windows") {
         project.artifact = "lib-windows"
         // configure windows stuff
    }
    bintray("linux") {
        project.artifact = "lib-linux"
        // configure linux stuff
    }
} 

You get a separate task for each publication so there's no conflict.

renatoathaydes commented 4 years ago

I use jlink to create the distributed images, and `jlink does not support cross-platform builds, that's why I need to build on each different platform (which GitHub Actions makes easy).

@natario1 would this work if the image for each platform was built on a separate machine, at different times (but still upload the assets for the same release version)?

natario1 commented 4 years ago

I think as long as you use a different artifact name (like lib-windows and lib-linux), you can already do this with the official plugin, you just have to set override = true.

I thought your problem was with releasing different things from the same gradle project, which is not very straightforward with the official plugin