Hi folks, whats the difference in my kotlin-based ...
# gradle
t
Hi folks, whats the difference in my kotlin-based gradle dsl between
Copy code
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
and
Copy code
implementation(kotlin("stdlib"))
Both seem to work fine for my project so i'd like to understand what each is doing?
s
The latter one is an extension function, which returns a
String
. You can step into it and you will see, that it concatenates “org.jetbrains.kotlin:kotlin-” with what you passed,
stdlib
. so in the end it’s exactly the same
🙏 1
c
and the platform line is useful to make sure that transient kotlin dependencies have the correct version
t
Ahh yes "bill of material"
👍
o
note that you may see a BOM-like effect without it, because the kotlin plugin declares special version constraints, but it is not the same as using the BOM