badass-jlink-plugin icon indicating copy to clipboard operation
badass-jlink-plugin copied to clipboard

release Java 23 compatible version

Open xzel23 opened this issue 1 year ago • 1 comments

The Plugin currently (version 3.0.1) fails to work on projects with JDK 23. There's already an unmerged PR that addresses this: https://github.com/beryx/badass-jlink-plugin/pull/271

I add this new issue to describe a workaround until a new version is released.

Workaround until new plugin version is released

NOTE: This only works when using the plugin on your local machine, so it is rather a "works-for-me" hack than a general solution.

  1. Check out the plugin code and apply the PR mentioned above.
  2. Change the plugin version (I used 3.0.2).
  3. build using ./gradlew build publishToMavenLocal publishJlinkPluginMarkerMavenPublicationToMavenLocal publishPluginMavenPublicationToMavenLocal (I am not sure if the latter two targets are really necessary)
  4. Create/edit your ~/.gradle/init.gradle to contain the following text:
settingsEvaluated { settings ->
    settings.pluginManagement {
        repositories {
            mavenLocal()
            gradlePluginPortal()
        }
    }
}
gradle.settingsEvaluated { settings ->
    settings.buildscript.repositories {
        mavenLocal()
        mavenCentral()
        gradlePluginPortal()
    }
}
  1. Update the plugin version in the project you want to use the patched plugin in

xzel23 avatar Sep 19 '24 04:09 xzel23

Sorry. I used the wrong filename. It's not ~/.gradle/gradle.init but ~/.gradle/init.gradle. Corrected it in the workaround description.

xzel23 avatar Sep 21 '24 11:09 xzel23

Hi @xzel23 , thanks for your patch and for keeping this plugin alive single handed! I've added your fork repository to the credits of my app!

https://github.com/CodeDead/opal/tree/development?tab=readme-ov-file#dependencies

CodeDead avatar Nov 04 '24 17:11 CodeDead

Thank you too. Actually I think we will see an updated version of the original plugin soon. Stay tuned!

xzel23 avatar Nov 05 '24 13:11 xzel23

Fixed with 3.1.0-rc-1. I have also successfully tested with Java 24 EA (you must have it installed locally and use a toolchain since Gradle does not support Java 24 yet).

xzel23 avatar Nov 06 '24 04:11 xzel23

Fixed with 3.1.0-rc-1. I have also successfully tested with Java 24 EA (you must have it installed locally and use a toolchain since Gradle does not support Java 24 yet).

Works like a charm! Thanks @xzel23 !

CodeDead avatar Nov 06 '24 11:11 CodeDead