Browse Source

feat: add an option to minimize kotlin standard library in AbstractProguardTask

pull/4948/head
Ellet 7 months ago
parent
commit
d389bd35bb
  1. 8
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/tasks/AbstractProguardTask.kt

8
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<Boolean?> = objects.nullableProperty()
@get:Optional
@get:Input
val minimizeKotlinStandardLibrary: Property<Boolean?> = objects.nullableProperty()
@get:Optional
@get:Input
val joinOutputJars: Property<Boolean?> = 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[]);

Loading…
Cancel
Save