Skip to content

Projects using badass jar plugin

Sean Gilligan edited this page Nov 4, 2021 · 7 revisions

Projects using badass-jar-plugin

This page is to list projects using badass-jar-plugin and implementation notes about how it was used in each project.

Supernaut.FX uses badass-jar-plugin after https://github.com/SupernautApp/SupernautFX/pull/29 (currently using badass-jar-plugin 2.0.0-rc5)

Supernaut.FX release builds use JDK 17 and the project has been oriented towards modularity and recent JDKs from the beginning. There is a base module (app.supernaut) that previously required JDK 9, but with the badass-jar-plugin it now supports JDK 8 while retaining the module-info allowing it to be used with jlink. The other modules require JavaFX and JDK 11, so do not use the badass-jar-plugin.

The right approach for this project was to put module-info.java in src/main/java and have the default JDK be JDK 9.

See the build.gradle for the app.supernaut base module.

In IntelliJ IDEA the project uses the default JDK 9, so IDEA is aware of modules as you are developing. One downside to this approach is that IDEA will allow you to use JDK 9 API features (e.g. List.of()) without providing a warning. Building with the setting that enables JDK 8 (in this case -PbaseModuleJavaCompatibility=8) will fail if JDK 9 or later features are used, but it would be better if these errors could be detected immediately while working in the IDE.

I added a comment to existing IntelliJ IDEA issue https://youtrack.jetbrains.com/issue/IDEA-190501 asking for this feature.

Clone this wiki locally