
Unbeknownst to many, since its first release back in 2021 JReleaser has had the option to release binaries regardless of their source language. This is because JReleaser is a release tool only, it does not build binaries for you. However it's capable of assembling a variety of archives and distributions. And if the project happens to be Java based then you may integrate it with popular Java build tools such as Apache Maven, Apache Ant, and Gradle.
The recent addition of the matrix element to the configuration DSL allows further integration of build and release steps. Projects continue to use their build tool of choice according to their requirements and constraints. Need to release a Rust based project? Keep building with Cargo. Or is it Zig based? The Zig build toolchain is quite good for compiling. But once binaries have been compiled it's the time for JReleaser to perform its duties.
Here's a list of examples showcasing how to setup JReleaser on projects with different languages. First, projects that offer cross-platform compilation on a single node:
https://github.com/jreleaser/helloworld-go
https://github.com/jreleaser/helloworld-zig
https://github.com/jreleaser/helloworld-rustx
https://github.com/jreleaser/helloworld-csharp
https://github.com/jreleaser/helloworld-deno
https://github.com/jreleaser/helloworld-bun
These projects make use of matrix, hooks, and the archive assembler to build and archive all binaries with a single command.
Next, projects that build binaries targeting different platforms using several nodes:
https://github.com/jreleaser/helloworld-cpp
https://github.com/jreleaser/helloworld-crystal
https://github.com/jreleaser/helloworld-elixir
https://github.com/jreleaser/helloworld-haskell
https://github.com/jreleaser/helloworld-nim
https://github.com/jreleaser/helloworld-ocaml
https://github.com/jreleaser/helloworld-odin
https://github.com/jreleaser/helloworld-pascal
https://github.com/jreleaser/helloworld-perl
https://github.com/jreleaser/helloworld-swift
The projects use the archive assembler to assemble archives for binaries compiled in different platforms. And for Java based projects:
https://github.com/jreleaser/helloworld-ballerina
https://github.com/jreleaser/helloworld-java-bin
https://github.com/jreleaser/helloworld-java-jar
https://github.com/jreleaser/helloworld-java-jlink
https://github.com/jreleaser/helloworld-java-jpackage
https://github.com/jreleaser/helloworld-java-graalvm
These projects (except for Ballerina) use specialized assemblers to create releasable distributions once Java classes have been compiled using Apache Maven.
If you're curious and browse through any of these repositories you'll notice that the release configuration is quite similar despite the different source languages used on each project. Their CI/CD configuration is almost identical, differing mainly on how the version number is set and setting up specific build tool chain and build instructions. What else can the tool do for your project? Have a look at the list of integrations. Would you rather use a different CI/CD solution? We've got you covered.
There are many ways to install JReleaser depending on your platform of choice and favorite package manager. But if you just want to get started right away on a Linux/MacOs system then simply run
$ curl https://jreleaser.org/setup.sh -sSfL | sh
This will download the CLI matching your current platform. Remember to follow the instructions on your terminal to add the executable to your $PATH.
As always, feedback is welcomed, feel free to file a ticket or start a discussion topic.
Keep on coding!
Image by Gerd Altmann from Pixabay