d

    dimsuz

    2 years ago
    How can I set
    kotlinOptions.jvmTarget = "1.8"
    for android target? Without it I have an error:
    Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6
    I tried
    android("android") {
            compilations.main.kotlinOptions {
                jvmTarget = "1.8"
            }
        }
    And it doesn't work, gives a DSL error.
    Kris Wong

    Kris Wong

    2 years ago
    tasks.withType<KotlinCompile>().configureEach {
        kotlinOptions.jvmTarget = "1.8"
    }
    d

    dimsuz

    2 years ago
    thank you!