Is there a difference between: ```tasks.withType(...
# gradle
e
Is there a difference between:
Copy code
tasks.withType(KotlinJvmCompile::class).configureEach {
    sourceCompatibility = JavaVersion.VERSION_11
    targetCompatibility = JavaVersion.VERSION_11

    kotlinOptions {
        jvmTarget = "11"
    }
}
and
Copy code
android {
  compileOptions {
    sourceCompatibility = JavaVersion.VERSION_11
    targetCompatibility = JavaVersion.VERSION_11
  }

  kotlinOptions {
    jvmTarget = "11"
  }
}
when using the
kotlin-android
plugin?
p
I have noticed a little inconsistency with what stdlib dependency kotlin plugin injects. Since configuring task is “lazy evaluation” approach kotlin plugin injects
kotlin-stdlib
instead of
kotlin-stdlib-jdk11
. Since there is a little practical difference between two I haven’t investigated further what actually happens. Was checking with
./gradlew :apk-module:dependencies --configuration releaseRuntimeClasspath
t
if you will confirm this - please open a new issue. Probably worth to fix it
a
I believe that
sourceCompatibility
and
targetCompatibility
is the properties coming from
JavaCompile
task rather than
KotlinJvmCompile
e
So using them in
android.compileOptions
wouldn't make sense for a 100% Kotlin project?