Skip to content

Commit

Permalink
Gradle plugin. macOs. Pass icon and name defined in build.gradle to t…
Browse files Browse the repository at this point in the history
…he Dock (#1386)

Fixes #1342
  • Loading branch information
igordmn committed Nov 11, 2021
1 parent 58a799b commit f4a143d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,12 @@ private fun JavaExec.configureRunTask(
executable(javaExecutable(app.javaHomeOrDefault()))
jvmArgs = arrayListOf<String>().apply {
addAll(defaultJvmArgs)

if (currentOS == OS.MacOS) {
val file = app.nativeDistributions.macOS.iconFile.ioFileOrNull
if (file != null) add("-Xdock:icon=$file")
}

addAll(app.jvmArgs)
val appResourcesDir = prepareAppResources.get().destinationDir
add("-D$APP_RESOURCES_DIR=${appResourcesDir.absolutePath}")
Expand Down

0 comments on commit f4a143d

Please sign in to comment.