Out of curiosity what's the point of Gradle settin...
# community-support
m
Out of curiosity what's the point of Gradle setting
languageVersion
for compiling
build.gradle.kts
scripts (see GraphQL Gradle compatibility matrix)? It's not like I'm going to publish my buildscripts 🤔 Is it for pre-compiled build-scripts? Something else?
v
Graphql matrix? If it wouldn't set the language version, they couldn't update the shipped Kotlin version, or a minor Gradle update would potentially breaking existing build scripts.
m
Graphql matrix?
Man, too much GraphQL 😅
If it wouldn't set the language version, they couldn't update the shipped Kotlin version, or a minor Gradle update would potentially breaking existing build scripts.
Mmmmm trying to understand that part... Kotlin should be backward compatible. If my build works with Gradle 8.0 (Kotlin 1.8) and then I bump Gradle to 8.3 (Kotlin 1.9), what would break?
The valid Kotlin 1.9 sources is a superset of the valid Kotlin 1.8 sources
So my
build.gradle.kts
would still compile
Or is there a counter example?
v
Kotlin is maybe binary backwards compatible, not necessarily source backwards compatible.
For example consider updating from Gradle 8.0 to 8.12+, so from Kotlin 1.8.10 to 2.0.21. Then have a look at all the source-incompatible changes in the Kotlin docs
👍 1
m
Fair enough.
The docs do not even say if
languageVersion
is actually changing anything
Ah yes it does for https://youtrack.jetbrains.com/issue/KTLC-102 for an example
Setting
languageVersion
is not enough though. Something like https://youtrack.jetbrains.com/issue/KTLC-106/ might still break
Mmm no it doesn't.