How to pass compiler arguments to Kotlin Compiler with Gradle

后端 未结 3 1239
暖寄归人
暖寄归人 2020-12-06 09:29

I\'m compiling a Kotlin library jar with Gradle using the Kotlin gradle plugin:

apply plugin: \'kotlin\'

I\'m trying to find a way to pass a sim

3条回答
  •  醉话见心
    2020-12-06 09:59

    If anyone is using the kotlin DSL you can try this too:

    import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
    
    val compileKotlin: KotlinCompile by tasks
    compileKotlin.kotlinOptions.includeRuntime = true
    

提交回复
热议问题