Browse Source

Gradle plugin. macOs. Pass icon and name defined in build.gradle to the Dock (#1386)

Fixes https://github.com/JetBrains/compose-jb/issues/1342
pull/1390/head v1.0.0-beta6-dev455
Igor Demin 3 years ago committed by GitHub
parent
commit
f4a143dbea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/internal/configureApplication.kt

6
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/internal/configureApplication.kt

@ -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}")

Loading…
Cancel
Save