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

Sourabh Rawat

12/05/2020, 6:20 AM
What is the difference between specifying jvmTarget with
Copy code
kotlin {

   targets {
      jvm {
         compilations.all {
            kotlinOptions {
               jvmTarget = "1.8"
            }
         }
      }
   }
}
and
Copy code
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
   kotlinOptions.jvmTarget = "1.8"
}
k

Kris Wong

12/07/2020, 1:55 PM
that's the same thing
the nice thing about the second form is that it applies to all targets, so any changes to your targets in the future will be handled