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 (JetBrains#1386)

Fixes JetBrains#1342
  • Loading branch information
igordmn authored and mareklangiewicz committed Feb 14, 2022
1 parent d5963ad commit 68380df
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 68380df

Please sign in to comment.