Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JPackage working directory in subproject incorrect with Gradle 8.12 #288

Open
bjorndarri opened this issue Jan 2, 2025 · 4 comments
Open
Assignees
Labels
wontfix This will not be worked on

Comments

@bjorndarri
Copy link

I ran into this problem today, the jpackage command could not locate icons with relative paths.

Looks like something changed between Gradle 8.11.1 and 8.12, which is causing the jpackage command to be run with the root project directory as working directory, instead of the subroject directory (this may be affecting other tasks as well, I haven't checked).

The project structure:

chinook root project

chinook/chinook-client-local subproject

Command:

gradle chinook-client-local:jpackage

Here's the the log output, indicating the problem in Working directory:

Gradle 8.11.1, correct working directory:

2025-01-02T15:59:11.146+0000 [INFO] [org.gradle.process.internal.DefaultExecHandle] Starting process 'command '/home/user/jdk/linux/jdk-23/bin/jpackage''. Working directory: /home/user/Projects/github/chinook/chinook-client-local Command: /home/user/jdk/linux/jdk-23/bin/jpackage [rest truncated]

Gradle 8.12, working directory is now the root project directory:

2025-01-02T16:00:40.290+0000 [INFO] [org.gradle.process.internal.DefaultExecHandle] Starting process 'command '/home/user/jdk/linux/jdk-23/bin/jpackage''. Working directory: /home/user/Projects/github/chinook Command: /home/user/jdk/linux/jdk-23/bin/jpackage [rest truncated]

I did a rather quick'n dirty test to see if the problem was in Gradle, by creating a simple JavaExec task in a subproject, with a main class which just printed out user.dir, and that output looked correct.

I also skimmed over the 8.12 release notes and didn't see anything which looked relevant.

I'm afraid I don't really have the know-how to figure this one out, but I'll play with this if I have time in the next few days, and report back if I find anything out.

bjorndarri added a commit to codion-is/world that referenced this issue Jan 2, 2025
bjorndarri added a commit to codion-is/chinook that referenced this issue Jan 2, 2025
@bjorndarri
Copy link
Author

@xzel23 xzel23 self-assigned this Jan 3, 2025
@xzel23
Copy link
Collaborator

xzel23 commented Jan 3, 2025

I can reproduce the problem. Will look into this later.

@armin-reichert
Copy link

Same issue here, seems to be this Gradle regression bug: gradle/gradle#31942

@xzel23
Copy link
Collaborator

xzel23 commented Jan 8, 2025

@armin-reichert Thank you for this information. As this seems indeed to be a Gradle bug, I will wait for the Gradle fix. If unexpectedly the problem is not solved when Gradle releases their fix, I will look into this again.

In the meantime, please downgrade Gradle to 8.11.1.

@xzel23 xzel23 added the wontfix This will not be worked on label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants