Are we serious right now? I just found out that, to support JVM Desktop from a common Kotlin library, every method with an optional parameter needs an
@JvmOverloads
annotation.
I’ve got hundreds of such methods — is there any shortcut, compiler flag, or plugin that can automatically generate these overloads for JVM compilation?
j
jw
10/31/2025, 6:46 PM
That isn't required, unless you want to expose things to Java
a
Azim Ansari
10/31/2025, 7:32 PM
Yeah. I am adding this annotation to lots of such public methods manually. Good that I kept most of the classes as private and internal.