https://kotlinlang.org logo
#announcements
Title
# announcements
r

runjorel

07/22/2019, 6:58 PM
Hi all. I am trying to use the
@JvmDefault
annotation. When try to add the compiler flag
-Xjvm-default=enable
into
tasks.withType<KotlinCompile> { kotlinOptions { ..
(Gradle Kotlin DSL) it seems to have no effect, and I still get a compiler warning saying I need to have that compiler flag turned on. Is there some where else this flag needs to be set?
c

Casey Brooks

07/22/2019, 7:01 PM
Are you trying to add it in common modules or multiplatform projects? I believe that annotation is only available in Kotlin/JVM modules
r

runjorel

07/22/2019, 7:02 PM
it is JVM only
looks like the correct flag is
"-Xenable-jvm-default=enable"
14 Views