mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 06:51:17 +07:00
[kotlin] Use kotlin("test") as test dependency in Kotlin Gradle wizard
^KTIJ-27750 fixed GitOrigin-RevId: a07db2e207048f01bfa5e364bbc21186c829f7b0
This commit is contained in:
committed by
intellij-monorepo-bot
parent
852a80f9a9
commit
376c44a068
-9
@@ -167,15 +167,6 @@ abstract class AbstractGradleBuildScriptBuilder<BSB : GradleBuildScriptBuilder<B
|
||||
}
|
||||
}
|
||||
|
||||
override fun withKotlinTest() = apply {
|
||||
withMavenCentral()
|
||||
// version is inherited from the Kotlin plugin
|
||||
addTestImplementationDependency("org.jetbrains.kotlin:kotlin-test")
|
||||
configureTestTask {
|
||||
call("useJUnitPlatform")
|
||||
}
|
||||
}
|
||||
|
||||
override fun withJUnit() = apply {
|
||||
when (isJunit5Supported(gradleVersion)) {
|
||||
true -> withJUnit5()
|
||||
|
||||
+9
@@ -23,6 +23,15 @@ abstract class GroovyDslGradleBuildScriptBuilder<BSB : GroovyDslGradleBuildScrip
|
||||
withPlugin("org.jetbrains.kotlin.jvm", version)
|
||||
}
|
||||
|
||||
override fun withKotlinTest() = apply {
|
||||
withMavenCentral()
|
||||
// version is inherited from the Kotlin plugin
|
||||
addTestImplementationDependency("org.jetbrains.kotlin:kotlin-test")
|
||||
configureTestTask {
|
||||
call("useJUnitPlatform")
|
||||
}
|
||||
}
|
||||
|
||||
override fun generate() = GroovyScriptBuilder().generate(generateTree())
|
||||
|
||||
internal class Impl(gradleVersion: GradleVersion) : GroovyDslGradleBuildScriptBuilder<Impl>(gradleVersion) {
|
||||
|
||||
+8
@@ -27,6 +27,14 @@ class KotlinDslGradleBuildScriptBuilder(
|
||||
}
|
||||
}
|
||||
|
||||
override fun withKotlinTest() = apply {
|
||||
withMavenCentral()
|
||||
addTestImplementationDependency(call("kotlin", "test"))
|
||||
configureTestTask {
|
||||
call("useJUnitPlatform")
|
||||
}
|
||||
}
|
||||
|
||||
override fun configureTestTask(configure: ScriptTreeBuilder.() -> Unit) =
|
||||
withPostfix {
|
||||
callIfNotEmpty("tasks.test", configure)
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation("org.jetbrains.kotlin:kotlin-test")
|
||||
testImplementation(kotlin("test"))
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation("org.jetbrains.kotlin:kotlin-test")
|
||||
testImplementation(kotlin("test"))
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation("org.jetbrains.kotlin:kotlin-test")
|
||||
testImplementation(kotlin("test"))
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation("org.jetbrains.kotlin:kotlin-test")
|
||||
testImplementation(kotlin("test"))
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation("org.jetbrains.kotlin:kotlin-test")
|
||||
testImplementation(kotlin("test"))
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation("org.jetbrains.kotlin:kotlin-test")
|
||||
testImplementation(kotlin("test"))
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation("org.jetbrains.kotlin:kotlin-test")
|
||||
testImplementation(kotlin("test"))
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation("org.jetbrains.kotlin:kotlin-test")
|
||||
testImplementation(kotlin("test"))
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
|
||||
Reference in New Issue
Block a user