Can someone explain what this means: ```implementa...
# multiplatform
r
Can someone explain what this means:
Copy code
implementation(kotlin("test-common"))
I understand the original gradle format well but I am finding information on the new kts format lacking
c
If your question is about the
Kotlin
function, just CTRL B on it to see its code, it is really easy to understand.
r
If i do that I end up here:
Copy code
fun kotlin(simpleModuleName: String, version: String?): ExternalModuleDependency
That doesn’t really tell me anything.
I understand its about getting dependencies but i don’t see where
test-common
is defined to know what libs and versions that refers to.
c
Ah, it brings to an abstract method, sorry. Essentially the idea is that the every Kotlin-related artifact is in group ‘`com.whatever-i-don't-recall.jetbrains.kotlin`', with the artifact name being `‘kotlin-whatever`' and the version should be the same as the version of the
Kotlin
plugin. The Kotlin function is just a shorthand to do that instead of writing the full string. If you want to explicitly know what's going on, you can run the gradle task ‘`dependencies`' which will give you much more details.
Essentially:
kotlin("test-common")
is just a shorthand for
"org.jetbrains.kotlin:kotlin-test-common:<Kotlin version you specified in the plugins block>"