krakowski / gradle-jextract

Gradle plugin for integrating Project Panama's jextract tool
https://plugins.gradle.org/plugin/io.github.krakowski.jextract
GNU General Public License v3.0
53 stars 10 forks source link

jextract binary could not be found in PATH (exe vs bat) #11

Closed andrej-gigogames closed 2 years ago

andrej-gigogames commented 2 years ago

Environment

How does this bug occur?

When running the gradle build task "./gradlew build" while using the gradle-jextract plugin

What happens when the bug occurs?

Basically it seems that the plugin is looking for '.exe' file, but the jextract project from https://github.com/openjdk/jextract actually generates ".bat" there is not '.exe' file. The file is on the PATH and can be invoked directly from the command prompt without specifying the location.

Would you like to submit a PR fixing this bug?

[X] YES [ ] NO

krakowski commented 2 years ago

Hi @andrej-gigogames,

thanks for pointing this out and your interest in this project :slightly_smiling_face: jextract was bundled in the JDK before it was extracted into a standalone repository. At that time there was still an .exe file.

If you would like, you can submit a PR changing the WINDOWS_EXECUTABLE variable (https://github.com/krakowski/gradle-jextract/blob/master/src/main/kotlin/io/github/krakowski/jextract/JextractTask.kt#L181) to jextract.bat, which should be enough in this case. I would then bump the version to 0.3.1.

krakowski commented 2 years ago

Fixed with https://github.com/krakowski/gradle-jextract/commit/354f9d218059c91b9715eb44976182a4dea554bd