Closed xinkunZ closed 1 month ago
Will these docs help to include this directory?
Will these docs help to include this directory?
I have read these docs , and I found that the gradle plugin can only add something to app directory, can not modify the runtime directory
is there any way to copy an exist directory to runtime folder after the createDistributable
task, then packageXXX
task can just use my runtime folder to create native image
Understand. It needs investigation. We use jlink/jpackage under the hood. If it isn't possible with them, we have to make a proposal/feature request in the JDK bug tracker.
If you just need some moules, for example "java.sql", which is required when you use gson(google), add module like this:
compose.desktop {
application {
mainClass = "com.xxx.MainKt"
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb, TargetFormat.Exe)
packageName = "Xxx"
packageVersion = "1.0.0"
modules("java.sql")
}
}
}
If you do not do this step(gson used). You will get error: classDefNotFoundError: java.sql.Time, when you start your exe file after installation completed.
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
I want to use jcef in my project, so I want to use jbr as the bundle runtime but after building, the target app for macOS only has jdk in runtime directory, but not copy
Frameworks
to runtime directorythe jbr:
the app bundle runtime: