With the new DSL for launching JVM apps, is there a way to run proguard on the jar for launch and distribution? Looking at the DefaultKotlinJvmBinariesDsl source, I’m not sure the necessary hooks are currently public (e.g.
jarTask
) although I wanted to see if someone else has explored this.
I’ve got a working series of custom tasks for building a fat jar, then a proguard jar from the fat jar, and was curious if this new DSL could simplify things down.
t
tapchicoma
04/29/2025, 12:38 PM
for launch you may try
finalizedBy(proguardTask)
approach on
Jar
task
tapchicoma
04/29/2025, 12:43 PM
or create a separate `JavaExec`/`Distribution` entries based on the base one created by KGP
c
Carter
04/29/2025, 2:46 PM
If I try
finalizedBy(proguardTask)
, what task specifically should I be finalizing? Is this something where I need to do
tasks.named("X")
?
t
tapchicoma
04/29/2025, 3:32 PM
I would say
Jar
task. Though there is no API to get either task name or
TaskProvider
sad panda
c
Carter
04/30/2025, 9:43 AM
So maybe I should file a YouTrack feature request?