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

Fixes #1342
  • Loading branch information
igordmn committed Nov 10, 2021
1 parent a464c14 commit ba79a84
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 ba79a84

Please sign in to comment.