wakingrufus
08/07/2023, 4:08 PMlanguageVersion = "1.4"
apiVersion = "1.4"
in ktlint so that it can still be used by projects not on 1.8 yet?wakingrufus
08/07/2023, 4:24 PMPaul Dingemans
08/07/2023, 4:32 PMwakingrufus
08/07/2023, 5:10 PMSha Sha Chu
08/07/2023, 7:02 PMmateusz.kwiecinski
08/07/2023, 7:27 PMPaul Dingemans
08/07/2023, 7:33 PMwakingrufus
08/07/2023, 7:35 PMmateusz.kwiecinski
08/07/2023, 7:51 PMmateusz.kwiecinski
08/07/2023, 7:53 PMwakingrufus
08/07/2023, 7:56 PMwakingrufus
08/07/2023, 7:57 PMPaul Dingemans
08/08/2023, 7:26 AMPaul Dingemans
08/13/2023, 3:29 PM1.0
and it would be great to decide on this topic.
Note that according to https://kotlinlang.org/docs/compatibility-modes.html only the three latest versions (1.7
, 1.8
and 1.9
are supported).Paul Dingemans
08/13/2023, 3:45 PMbuild.gradle.kts
in build-logic
by adding a compileOptions
block. This was the lowest that I could go:
tasks.withType<KotlinCompile>().configureEach {
// Convert Java version (e.g. "1.8" or "11") to Kotlin JvmTarget ("8" resp. "11")
compilerOptions.jvmTarget.set(JvmTarget.fromTarget(buildLogicTargetJavaVersion.toString()))
compilerOptions {
kotlinOptions {
languageVersion = "1.5"
apiVersion = "1.4"
}
}
}
With languageVersion = "1.4"
I get compile errors when loading the gradle changes. It might be possible to resolve them, but I would like a more gradle knowledgeable developer to do so.wakingrufus
08/13/2023, 9:04 PMmateusz.kwiecinski
08/14/2023, 7:51 AMDid anyone made an attempt to validate this?I tried to set both language&api version to 1.4, but seeing the number of errors, I realised I don't really get why current setup works when Gradle forces runtime Kotlin version. As a conclusion I decided I'll need to delve into this topic again (but I've been busy recently π) I'll share y findings when I have any π I confirm the defaults you set seem OK for a starter π
Paul Dingemans
08/14/2023, 12:05 PMmateusz.kwiecinski
08/14/2023, 12:10 PM