Live data from Hacker News

JReleaser: quick and effortless way to release your project

jreleaser.org

21–30 of 37 posts

Re: JReleaser: quick and effortless way to release your project

#21
post #13

Is it somehow related to GoReleaser? I saw GoReleaser supports multiple languages now as well

Had the same question, surprised it's not addressed in the faq.

JReleaser author here.

Yes, GoReleaser served as an inspiration to get started with the tool. The guide does mention this connection. I can certainly add one more entry to the FAQ to make it easier to find.

Regarding multi-language support, it’s available since day 1. Recently it became better https://andresalmiray.com/multi-language-support-in-jrelease...

Re: JReleaser: quick and effortless way to release your project

#22
post #16

Is there a doc for Python apps?

Technically it already works as long as your app is published to GH releases and/or the currently supported package managers.

Support for explicit Python ecosystem tools and services (pypi, .whl files, etc) is forthcoming.

Re: JReleaser: quick and effortless way to release your project

#23
post #3

This doesn’t seem to address building installers, unfortunately.

It does. This is one of the initial reasons to create such tool. At the moment you can assemble native installers with jpackage (project must be Java based) https://jreleaser.org/guide/latest/reference/assemble/jpacka... or create a .deb file (does not bundle a Java runtime, project does not have to be Java based) https://jreleaser.org/guide/latest/reference/assemble/deb.ht...

Re: JReleaser: quick and effortless way to release your project

#24
post #4

When I released my last Java project, I came out with a MacOS DMG, a Windows EXE installer, a Windows MSI installer, and a Fat Jar for Linux. Now we have MacOS ARM, MacOS x86, Linux ARM/x86, Windows ARM/x86. Even for a basic "cross platform" Java program (that bundles the JRE), that's 6 installs, which ostensibly need to be built on their respective platforms. Add on to that if you using something that includes a bin…

This burden is what prompted me to create JReleaser in the first place as I also wanted to release a JavaFX application without instructing people to clone a repository and build the app themselves.

Because JReleaser is a release tool and not a build tool you are free to build however it’s needed, collect all artifacts and release them. I do this for the Ikonli JavaFX browser: build the app with Gradle which bundles platform specific JARs, then release them with JReleaser.

https://github.com/kordamp/ikonli Shows how it can be done. Requires building with GH Actions in multiple platforms.

Re: JReleaser: quick and effortless way to release your project

#25
post #4

When I released my last Java project, I came out with a MacOS DMG, a Windows EXE installer, a Windows MSI installer, and a Fat Jar for Linux. Now we have MacOS ARM, MacOS x86, Linux ARM/x86, Windows ARM/x86. Even for a basic "cross platform" Java program (that bundles the JRE), that's 6 installs, which ostensibly need to be built on their respective platforms. Add on to that if you using something that includes a bin…

I create all those binaries automatically for my javafx project using GitHub actions, jlink, and jpackage, works well so far.

Re: JReleaser: quick and effortless way to release your project

#26
post #4

When I released my last Java project, I came out with a MacOS DMG, a Windows EXE installer, a Windows MSI installer, and a Fat Jar for Linux. Now we have MacOS ARM, MacOS x86, Linux ARM/x86, Windows ARM/x86. Even for a basic "cross platform" Java program (that bundles the JRE), that's 6 installs, which ostensibly need to be built on their respective platforms. Add on to that if you using something that includes a bin…

I faced similar problems some years ago, and frankly even if you use Electron the tools aren't that great. So I made a new tool (Conveyor) along with a company (Hydraulic):

https://hydraulic.dev/

Conveyor is free to use for open source projects and works how you'd hope it works: it's a signup/account-free downloadable CLI tool. You run a single command from your dev laptop (or a cheap Linux CI worker) and it builds/signs all the packages for every target OS and CPU architecture in one go, uploads them, and integrates the app with a native auto update engine. Sparkle on macOS, MSIX on Windows, an apt repository for Debian/Ubuntu users. It'll even make a download HTML page for you that detects the user's platform and gives a big green download button.

There's a bunch of sample apps showing how to integrate it into your {Electron,JavaFX,Compose for Desktop,native} app. "conveyor generate javafx my-sample-app" will spit out scaffolding that uses Gradle, and there's a Gradle plugin to import all the build info into Conveyor too. End result is you do:

    ./gradlew jar && conveyor make copied-site
And a new version of your app is released, existing users will start to update. That's all there is to it. It'll use jlink, jdeps and so on to make an optimized bundled JVM for your app. The big remaining pain is still code signing - Conveyor understands all the signature formats and protocols natively and will handle all that, but you do need to buy certificates. If you don't it'll make self signed apps which can be distributed and used but which will require the user to bypass various warnings.

Re: JReleaser: quick and effortless way to release your project

#27
post #4

When I released my last Java project, I came out with a MacOS DMG, a Windows EXE installer, a Windows MSI installer, and a Fat Jar for Linux. Now we have MacOS ARM, MacOS x86, Linux ARM/x86, Windows ARM/x86. Even for a basic "cross platform" Java program (that bundles the JRE), that's 6 installs, which ostensibly need to be built on their respective platforms. Add on to that if you using something that includes a bin…

> The release burden is, well, frankly, daunting for a small project.

With its large user base, I would have expected Java to have figured out all the details and offered users a single command-line tool that automatically builds the project into installers. I had adventures with relatable pain points when figuring out how to distribute Julia's GUI applications.

Another upcoming difficulty is transitioning to distributing applications that run in the sandbox. Windows has MSIX, Linux has Snap and Flatpack, and macOS has DMGs signed with entitlements. Each has its way of configuring and how it is expected to work, and debugging sandboxing issues is no fun.

I made an application bundler specifically for Julia's MSIX, Snap, and DMG applications, which allows the use of the underlying configuration files when configuring the sandbox via a simple recipe system. Unlikely one would change languages, but perhaps some inspiration can be taken from my project:

https://github.com/PeaceFounder/AppBundler.jl

Re: JReleaser: quick and effortless way to release your project

#28

Earlier quoted context omitted.

Did you look at https://www.jdeploy.com/ ?

I did, but at the time it was touted more as a centralized service that I wasn’t really interested in. Maybe it’s better now.

What do you mean be centralized service? It allows you to publish to GitHub releases or npm. Do you mean "central" like "GitHub"?

Re: JReleaser: quick and effortless way to release your project

#29
post #4

When I released my last Java project, I came out with a MacOS DMG, a Windows EXE installer, a Windows MSI installer, and a Fat Jar for Linux. Now we have MacOS ARM, MacOS x86, Linux ARM/x86, Windows ARM/x86. Even for a basic "cross platform" Java program (that bundles the JRE), that's 6 installs, which ostensibly need to be built on their respective platforms. Add on to that if you using something that includes a bin…

> The release burden is, well, frankly, daunting for a small project. With its large user base, I would have expected Java to have figured out all the details and offered users a single command-line tool that automatically builds the project into installers. I had adventures with relatable pain points when figuring out how to distribute Julia's GUI applications. Another upcoming difficulty is transitioning to distrib…

[deleted]

Re: JReleaser: quick and effortless way to release your project

#30
This looks really cool. I'm surprised I didn't find this before when I was searching for something like this. I've been using jpackage[1] for a while now but this seems like it would be easier for me to manage using JReleaser given there is support via Gradle.

Would this be a simple lift and shift job to move to JReleaser (as it seems like it just uses jpackage behind the scenes)? With jpackage, if you want to create a Windows exe, it needs to be built on Windows. Similarly, build dmg on Mac and deb for Linux. Does Jreleaser also require this?

[1] https://docs.oracle.com/en/java/javase/22/docs/specs/man/jpa...

Post reply on HN