MPP wizard [web]: add kotlin-test as dependency to all source sets
#KT-26239 Fixed
This commit is contained in:
+2
@@ -48,5 +48,7 @@ abstract class KotlinGradleAbstractMultiplatformModuleBuilder : GradleModuleBuil
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val productionSuffix = "Main"
|
const val productionSuffix = "Main"
|
||||||
|
|
||||||
|
const val testSuffix = "Test"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+20
@@ -12,8 +12,11 @@ class KotlinGradleWebMultiplatformModuleBuilder : KotlinGradleAbstractMultiplatf
|
|||||||
private var jsTargetName: String = "js"
|
private var jsTargetName: String = "js"
|
||||||
|
|
||||||
private val commonSourceName get() = "$commonName$productionSuffix"
|
private val commonSourceName get() = "$commonName$productionSuffix"
|
||||||
|
private val commonTestName get() = "$commonName$testSuffix"
|
||||||
private val jvmSourceName get() = "$jvmTargetName$productionSuffix"
|
private val jvmSourceName get() = "$jvmTargetName$productionSuffix"
|
||||||
|
private val jvmTestName get() = "$jvmTargetName$testSuffix"
|
||||||
private val jsSourceName get() = "$jsTargetName$productionSuffix"
|
private val jsSourceName get() = "$jsTargetName$productionSuffix"
|
||||||
|
private val jsTestName get() = "$jsTargetName$testSuffix"
|
||||||
|
|
||||||
override fun getBuilderId() = "kotlin.gradle.multiplatform.web"
|
override fun getBuilderId() = "kotlin.gradle.multiplatform.web"
|
||||||
|
|
||||||
@@ -35,16 +38,33 @@ class KotlinGradleWebMultiplatformModuleBuilder : KotlinGradleAbstractMultiplatf
|
|||||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
|
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$commonTestName {
|
||||||
|
dependencies {
|
||||||
|
implementation 'org.jetbrains.kotlin:kotlin-test-common'
|
||||||
|
implementation 'org.jetbrains.kotlin:kotlin-test-annotations-common'
|
||||||
|
}
|
||||||
|
}
|
||||||
$jvmSourceName {
|
$jvmSourceName {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
|
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$jvmTestName {
|
||||||
|
dependencies {
|
||||||
|
implementation 'org.jetbrains.kotlin:kotlin-test'
|
||||||
|
implementation 'org.jetbrains.kotlin:kotlin-test-junit'
|
||||||
|
}
|
||||||
|
}
|
||||||
$jsSourceName {
|
$jsSourceName {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-js'
|
implementation 'org.jetbrains.kotlin:kotlin-stdlib-js'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$jsTestName {
|
||||||
|
dependencies {
|
||||||
|
implementation 'org.jetbrains.kotlin:kotlin-test-js'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
|
|||||||
Reference in New Issue
Block a user