diff --git a/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/tasks/AbstractProguardTask.kt b/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/tasks/AbstractProguardTask.kt index fa04502a91..bb5cffafcb 100644 --- a/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/tasks/AbstractProguardTask.kt +++ b/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/tasks/AbstractProguardTask.kt @@ -42,6 +42,10 @@ abstract class AbstractProguardTask : AbstractComposeDesktopTask() { @get:Input val dontoptimize: Property = objects.nullableProperty() + @get:Optional + @get:Input + val minimizeKotlinStandardLibrary: Property = objects.nullableProperty() + @get:Optional @get:Input val joinOutputJars: Property = objects.nullableProperty() @@ -125,6 +129,10 @@ abstract class AbstractProguardTask : AbstractComposeDesktopTask() { writer.writeLn("-dontoptimize") } + if (minimizeKotlinStandardLibrary.orNull == false) { + writer.writeLn("-keep class kotlin.** { *; }") + } + writer.writeLn(""" -keep public class ${mainClass.get()} { public static void main(java.lang.String[]);