New IntelliJ Plugin for jDeploy
Create a new desktop app with automated releases on GitHub in under 2 minutes
It has been a while since the last update on jDeploy, but I have been quietly fixing bugs and adding new features, as time permits. One highlight that I’d like to share is the new IntelliJ plugin that provides a “new project” wizard that makes it easy to bootstrap a project using Swing, JavaFX, or Codename One.
Originally, I created jDeploy to be project-structure agnostic, thinking that people would use all of their existing workflows to generate their jar, and then pass that to jDeploy, which would run as a command-line tool. All it needs is an executable jar as input. I observed, however, that setting up a Java project to output executable jars can be challenging in its own right. Creating a new project from “zero” has always felt more painful than it should be, so I decided create a wizard that will generate a project that works right out of the box.
In addition to creating the project locally, the wizard will create a new GitHub repository, that is set up to generate new releases on every commit. Within 30 seconds of creating your project, you should be able to download and install the app from GitHub releases.
After you install the plugin, you should notice a new “jDeploy” option is displayed in the “New Project” wizard of IntelliJ, as shown here:
It allows you to select from an assortment of project templates. Currently only Swing, JavaFX, and Codename One are available, but, more will be added in the future. Let me know if there is a project type that you would like to see added here.
On the next, and final step, of the wizard, you select the project’s name and location.
I created a sample Swing project as part of the video tutorial that I will keep online. You can access the GitHub repository here. It includes GitHub workflows that automatically publish native installers via GitHub releases on each commit. Each branch of the repository gets its own corresponding release, with the same name as the branch.
The release includes installers for each supported desktop platform.
These installers are kept in sync with their corresponding branch. E.g. If you commit changes to the “master” branch, then the “master” release will automatically be updated with the latest changes from the master branch. In addition, users who have previously installed a branch’s version of the app will automatically receive the latest updates from that branch each time they open the app.
Different branch is synced to its own, independent version of the app.
“Tags” or “Releases” also receive their own updates. E.g. If you create a tag for “v1.0.0”, and a user installs the version from this release, then if you later create a new tag, say “v1.0.1”, that user will automatically receive this update the next time they open the app.
See the releases page for the sample Swing app.
The jDeploy Settings Dialog
The IntelliJ plugin also integrates the jDeploy GUI directly into the IDE so that you no longer need to launch it separately. Just right-click on the project and select “jDeploy Settings” from the context-menu.
See the example Swing application published by jDeploy to GitHub pages here.
jDeploy has already fulfilled the original vision that I had when I began work on it. I wanted to make it as easy as possible to deploy a desktop app to my users, and have updates automatically pushed out when I made improvements. Mission accomplished.
That said, there is always more that can be done. More project templates, more plugins, and more enterprise-level features. If you have any requests, please let me know. Are there missing features that are currently preventing you from using jDeploy in your apps?
Anyways, I’d like to wish you all a happy new year, and good fortune in 2024.