https://kotlinlang.org logo
#gradle
Title
s

snowe

07/20/2018, 9:21 PM
following the instructions on the kotlin gradle page I have this code
Copy code
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
    kotlinOptions {
        suppressWarnings = true
        jvmTarget = "1.8"
    }
}
but it's resulting in this error.
Copy code
* What went wrong:
Script compilation errors:

  Line 35: tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
                                                            ^ Classifier 'KotlinCompile' does not have a companion object, and thus must be initialized here

  Line 36:     kotlinOptions {
               ^ Unresolved reference: kotlinOptions

  Line 37:         suppressWarnings = true
                   ^ Unresolved reference: suppressWarnings

  Line 38:         jvmTarget = "1.8"
                   ^ Unresolved reference: jvmTarget
2 Views