Dears, I'm using gradle test suites : <https://doc...
# getting-started
j
Dears, I'm using gradle test suites : https://docs.gradle.org/current/userguide/jvm_test_suite_plugin.html To split UTs/ITs But I cannot add
Copy code
implementation(kotlin("test"))
to the dependencies of the
IntegrationTest
suite. It seems that the kotlin extensions do not support this yet. How can I add kotlin-test without
kotlin("test")
in gradle? Thanks!
j
That function only adds
org.jetbrains.kotlin:kotlin-
j
indeed, I've added this:
Copy code
fun JvmComponentDependencies.kotlin(module: String, version: String? = null): String =
    "org.jetbrains.kotlin:kotlin-$module${version?.let { ":${'$'}version" } ?: ""}"
Problem solved, thanks
e
eh?
"${'$'}version"
doesn't look right, you're never actually substituting
version
the actual implementation used is more like
Copy code
fun kotlin(simpleModuleName: String, version: String?): ExternalModuleDependency =
    project.dependencies.create(
        "org.jetbrains.kotlin:kotlin-$simpleModuleName" + version?.let { ":$it" }.orEmpty()
    ) as ExternalModuleDependency