Browse Source

Provide relative path to jpackage --main-jar

pull/2973/head
mcpiroman 3 years ago committed by Alexey Tsvetkov
parent
commit
8d78c4ac67
  1. 3
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/tasks/AbstractJPackageTask.kt

3
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/tasks/AbstractJPackageTask.kt

@ -321,7 +321,8 @@ abstract class AbstractJPackageTask @Inject constructor(
val mappedJar = libsMapping[launcherMainJar.ioFile]?.singleOrNull()
?: error("Main jar was not processed correctly: ${launcherMainJar.ioFile}")
cliArg("--main-jar", mappedJar)
val mainJarRelative = (if (currentTarget.os == OS.Windows) "\\" else "/") + mappedJar.relativeTo(libsDir.ioFile).toString()
cliArg("--main-jar", mainJarRelative)
cliArg("--main-class", launcherMainClass)
if (currentOS == OS.Windows) {

Loading…
Cancel
Save