In gradle.build.kts
, is there any difference between following two
plugins {
id("org.jetbrains.kotlin.jvm") version "1.5.31" // simple way
}
plugins {
kotlin("jvm") version "1.5.31" // indirect way
}
Is there any reason not to use id("org.jetbrains.kotlin.jvm")
?
Context:
I'm pretty sure that functionally these two are identical. (from decompiled code)
I strongly prefer
id("org.jetbrains.kotlin.jvm")
. (e.g. gradle errors containorg.jetbrains.kotlin.jvm
, notkotlin("jvm")
)Some (most?) docs use
kotlin("jvm")
kotlinlang.org/..,
butid("org.jetbrains.kotlin.jvm")
is also used plugins.gradle.org/plugin/org.jetbrains.kotlin.jvm docs.gradle.org/current/samples/sample_building_kotlin_libraries.html,
so "undocumented way" should not apply.I assume I am missing something, because I fail to understand the reason for existence of
kotlin("jvm")
. (actually I got two theories, both of which seem subpar: 17 characters seemed very important to somebody, "coolness" factor)