Replace kotlin-test project dependencies in the project

Use dependency helper function that chooses whether to take them
from the bootstrap repository or from a configuration of kotlin-test

KT-61969
This commit is contained in:
Ilya Gorbunov
2023-11-08 05:12:24 +01:00
committed by Space Team
parent f07bf70aa7
commit d2aae67e03
44 changed files with 51 additions and 68 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ dependencies {
testImplementation(project(":analysis:analysis-api-standalone:analysis-api-fir-standalone-base")) testImplementation(project(":analysis:analysis-api-standalone:analysis-api-fir-standalone-base"))
testImplementation(project(":analysis:decompiled:decompiler-to-file-stubs")) testImplementation(project(":analysis:decompiled:decompiler-to-file-stubs"))
testImplementation(project(":analysis:decompiled:decompiler-to-psi")) testImplementation(project(":analysis:decompiled:decompiler-to-psi"))
testImplementation(project(":kotlin-test:kotlin-test-junit")) testImplementation(kotlinTest("junit"))
testApi(projectTests(":analysis:analysis-test-framework")) testApi(projectTests(":analysis:analysis-test-framework"))
testImplementation(toolsJar()) testImplementation(toolsJar())
@@ -12,7 +12,7 @@ dependencies {
testApi(platform(libs.junit.bom)) testApi(platform(libs.junit.bom))
testImplementation(libs.junit.jupiter.api) testImplementation(libs.junit.jupiter.api)
testRuntimeOnly(libs.junit.jupiter.engine) testRuntimeOnly(libs.junit.jupiter.engine)
testImplementation(project(":kotlin-test:kotlin-test-junit")) testImplementation(kotlinTest("junit"))
testImplementation(projectTests(":compiler:tests-common")) testImplementation(projectTests(":compiler:tests-common"))
testApi(projectTests(":compiler:test-infrastructure-utils")) testApi(projectTests(":compiler:test-infrastructure-utils"))
testApi(projectTests(":compiler:test-infrastructure")) testApi(projectTests(":compiler:test-infrastructure"))
@@ -16,7 +16,7 @@ dependencies {
testApi(platform(libs.junit.bom)) testApi(platform(libs.junit.bom))
testImplementation(libs.junit.jupiter.api) testImplementation(libs.junit.jupiter.api)
testRuntimeOnly(libs.junit.jupiter.engine) testRuntimeOnly(libs.junit.jupiter.engine)
testImplementation(project(":kotlin-test:kotlin-test-junit")) testImplementation(kotlinTest("junit"))
testImplementation(project(":analysis:analysis-api")) testImplementation(project(":analysis:analysis-api"))
testImplementation(project(":analysis:analysis-api-standalone:analysis-api-standalone-base")) testImplementation(project(":analysis:analysis-api-standalone:analysis-api-standalone-base"))
testImplementation(projectTests(":compiler:tests-common")) testImplementation(projectTests(":compiler:tests-common"))
@@ -20,7 +20,7 @@ dependencies {
testImplementation(projectTests(":analysis:analysis-api-impl-base")) testImplementation(projectTests(":analysis:analysis-api-impl-base"))
testImplementation(projectTests(":analysis:analysis-api-fir")) testImplementation(projectTests(":analysis:analysis-api-fir"))
testImplementation(project(":kotlin-test:kotlin-test-junit")) testImplementation(kotlinTest("junit"))
testImplementation(toolsJar()) testImplementation(toolsJar())
testApi(platform(libs.junit.bom)) testApi(platform(libs.junit.bom))
testImplementation(libs.junit.jupiter.api) testImplementation(libs.junit.jupiter.api)
@@ -10,7 +10,7 @@ dependencies {
testImplementation(libs.junit.jupiter.api) testImplementation(libs.junit.jupiter.api)
testRuntimeOnly(libs.junit.jupiter.engine) testRuntimeOnly(libs.junit.jupiter.engine)
testImplementation(project(":kotlin-test:kotlin-test-junit")) testImplementation(kotlinTest("junit"))
testImplementation(project(":analysis:analysis-internal-utils")) testImplementation(project(":analysis:analysis-internal-utils"))
testImplementation(project(":compiler:psi")) testImplementation(project(":compiler:psi"))
testImplementation(project(":analysis:kt-references")) testImplementation(project(":analysis:kt-references"))
+1 -1
View File
@@ -50,7 +50,7 @@ dependencies {
testImplementation(projectTests(":analysis:analysis-api-impl-barebone")) testImplementation(projectTests(":analysis:analysis-api-impl-barebone"))
testImplementation(projectTests(":analysis:analysis-test-framework")) testImplementation(projectTests(":analysis:analysis-test-framework"))
testImplementation(projectTests(":analysis:analysis-api-impl-base")) testImplementation(projectTests(":analysis:analysis-api-impl-base"))
testImplementation(project(":kotlin-test:kotlin-test-junit")) testImplementation(kotlinTest("junit"))
testApi(platform(libs.junit.bom)) testApi(platform(libs.junit.bom))
testImplementation(libs.junit.jupiter.api) testImplementation(libs.junit.jupiter.api)
testRuntimeOnly(libs.junit.jupiter.engine) testRuntimeOnly(libs.junit.jupiter.engine)
+2 -3
View File
@@ -12,13 +12,12 @@ dependencies {
testImplementation(intellijCore()) // Should come before compiler, because of "progarded" stuff needed for tests testImplementation(intellijCore()) // Should come before compiler, because of "progarded" stuff needed for tests
testApi(project(":kotlin-script-runtime")) testApi(project(":kotlin-script-runtime"))
testApi(project(":kotlin-test:kotlin-test-jvm"))
testApi(kotlinStdlib()) testApi(kotlinStdlib())
testApi(kotlinTest())
testCompileOnly(kotlinTest("junit"))
testImplementation(libs.junit4) testImplementation(libs.junit4)
testCompileOnly(project(":kotlin-test:kotlin-test-jvm"))
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
testApi(projectTests(":compiler:tests-common")) testApi(projectTests(":compiler:tests-common"))
testApi(projectTests(":compiler:tests-common-new")) testApi(projectTests(":compiler:tests-common-new"))
testApi(projectTests(":compiler:fir:raw-fir:psi2fir")) testApi(projectTests(":compiler:fir:raw-fir:psi2fir"))
+1 -2
View File
@@ -10,8 +10,7 @@ dependencies {
compileOnly(intellijCore()) compileOnly(intellijCore())
testApi(kotlinStdlib()) testApi(kotlinStdlib())
testCompileOnly("org.jetbrains:annotations:13.0") testCompileOnly("org.jetbrains:annotations:13.0")
testApi(project(":kotlin-test:kotlin-test-jvm")) testApi(kotlinTest("junit"))
testApi(project(":kotlin-test:kotlin-test-junit"))
testImplementation(libs.junit4) testImplementation(libs.junit4)
testCompileOnly(intellijCore()) testCompileOnly(intellijCore())
@@ -7,7 +7,7 @@ plugins {
dependencies { dependencies {
testImplementation(kotlinStdlib()) testImplementation(kotlinStdlib())
testImplementation(project(":kotlin-test:kotlin-test-jvm")) testImplementation(kotlinTest("junit"))
testImplementation(project(":kotlin-daemon")) testImplementation(project(":kotlin-daemon"))
testImplementation(project(":kotlin-daemon-client")) testImplementation(project(":kotlin-daemon-client"))
testImplementation(libs.junit4) testImplementation(libs.junit4)
@@ -14,8 +14,7 @@ dependencies {
compileOnly(intellijCore()) compileOnly(intellijCore())
testImplementation(libs.junit4) testImplementation(libs.junit4)
testCompileOnly(project(":kotlin-test:kotlin-test-jvm")) testCompileOnly(kotlinTest("junit"))
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
testApi(projectTests(":compiler:tests-common")) testApi(projectTests(":compiler:tests-common"))
testApi(project(":compiler:fir:checkers")) testApi(project(":compiler:fir:checkers"))
testApi(project(":compiler:fir:checkers:checkers.jvm")) testApi(project(":compiler:fir:checkers:checkers.jvm"))
+1 -2
View File
@@ -21,8 +21,7 @@ dependencies {
compileOnly(intellijCore()) compileOnly(intellijCore())
testCompileOnly(project(":kotlin-test:kotlin-test-jvm")) testCompileOnly(kotlinTest("junit"))
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
testApi(projectTests(":compiler:test-infrastructure")) testApi(projectTests(":compiler:test-infrastructure"))
testApi(projectTests(":compiler:test-infrastructure-utils")) testApi(projectTests(":compiler:test-infrastructure-utils"))
testApi(projectTests(":compiler:tests-compiler-utils")) testApi(projectTests(":compiler:tests-compiler-utils"))
@@ -19,8 +19,7 @@ dependencies {
testRuntimeOnly(commonDependency("commons-lang:commons-lang")) testRuntimeOnly(commonDependency("commons-lang:commons-lang"))
testImplementation(libs.junit4) testImplementation(libs.junit4)
testCompileOnly(project(":kotlin-test:kotlin-test-jvm")) testCompileOnly(kotlinTest("junit"))
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
testApi(projectTests(":compiler:tests-common")) testApi(projectTests(":compiler:tests-common"))
testRuntimeOnly(project(":core:descriptors.runtime")) testRuntimeOnly(project(":core:descriptors.runtime"))
@@ -26,8 +26,7 @@ dependencies {
testImplementation(projectTests(":compiler:tests-common")) testImplementation(projectTests(":compiler:tests-common"))
testImplementation(projectTests(":compiler:fir:raw-fir:psi2fir")) testImplementation(projectTests(":compiler:fir:raw-fir:psi2fir"))
testCompileOnly(project(":kotlin-test:kotlin-test-jvm")) testCompileOnly(kotlinTest("junit"))
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
testRuntimeOnly(project(":core:descriptors.runtime")) testRuntimeOnly(project(":core:descriptors.runtime"))
@@ -22,8 +22,7 @@ dependencies {
testImplementation(projectTests(":compiler:tests-common")) testImplementation(projectTests(":compiler:tests-common"))
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false } testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
testCompileOnly(project(":kotlin-test:kotlin-test-jvm")) testCompileOnly(kotlinTest("junit"))
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
testRuntimeOnly(project(":core:descriptors.runtime")) testRuntimeOnly(project(":core:descriptors.runtime"))
@@ -23,7 +23,7 @@ dependencies {
compileOnly(intellijCore()) compileOnly(intellijCore())
testImplementation(libs.junit4) testImplementation(libs.junit4)
testApi(project(":kotlin-test:kotlin-test-junit")) testApi(kotlinTest("junit"))
testApi(kotlinStdlib()) testApi(kotlinStdlib())
testApi(projectTests(":kotlin-build-common")) testApi(projectTests(":kotlin-build-common"))
testApi(projectTests(":compiler:tests-common")) testApi(projectTests(":compiler:tests-common"))
+1 -1
View File
@@ -51,7 +51,7 @@ dependencies {
testCompileOnly(project(":plugins:android-extensions-compiler")) testCompileOnly(project(":plugins:android-extensions-compiler"))
testApi(projectTests(":generators:test-generator")) testApi(projectTests(":generators:test-generator"))
testApi(projectTests(":compiler:tests-compiler-utils")) testApi(projectTests(":compiler:tests-compiler-utils"))
testApi(project(":kotlin-test:kotlin-test-jvm")) testApi(kotlinTest())
testApi(project(":kotlin-scripting-compiler-impl")) testApi(project(":kotlin-scripting-compiler-impl"))
testApi(projectTests(":compiler:test-infrastructure-utils")) testApi(projectTests(":compiler:test-infrastructure-utils"))
testApi(libs.junit4) // for ComparisonFailure testApi(libs.junit4) // for ComparisonFailure
@@ -39,8 +39,7 @@ dependencies {
implementation(project(":compiler:util")) implementation(project(":compiler:util"))
implementation(project(":compiler:ir.serialization.common")) implementation(project(":compiler:ir.serialization.common"))
testImplementation(kotlin("test-junit")) testImplementation(kotlinTest("junit"))
testImplementation(project(":kotlin-test:kotlin-test-junit"))
} }
tasks { tasks {
@@ -15,8 +15,7 @@ kotlin {
commonTest { commonTest {
dependencies { dependencies {
// projectOrFiles is required for the performance project that includes kotlinx.cli compositely // projectOrFiles is required for the performance project that includes kotlinx.cli compositely
projectOrFiles(project, ":kotlin-test:kotlin-test-common")?.let { implementation(it) } projectOrFiles(project, ":kotlin-test")?.let { implementation(it) }
projectOrFiles(project, ":kotlin-test:kotlin-test-annotations-common")?.let { implementation(it) }
} }
kotlin.srcDir("src/tests") kotlin.srcDir("src/tests")
} }
@@ -30,7 +29,7 @@ kotlin {
// JVM-specific tests and their dependencies: // JVM-specific tests and their dependencies:
compilations["test"].defaultSourceSet { compilations["test"].defaultSourceSet {
dependencies { dependencies {
implementation(project(":kotlin-test:kotlin-test-junit")) implementation(kotlinTest("junit"))
} }
} }
+1 -1
View File
@@ -24,7 +24,7 @@ dependencies {
implementation project(path: ':kotlin-native:backend.native', configuration: 'cli_bcApiElements') implementation project(path: ':kotlin-native:backend.native', configuration: 'cli_bcApiElements')
implementation project(":kotlin-native:utilities:basic-utils") implementation project(":kotlin-native:utilities:basic-utils")
testImplementation libs.junit4 testImplementation libs.junit4
testImplementation project(":kotlin-test:kotlin-test-junit") testImplementation RepoDependencies.kotlinTest(project, "junit")
} }
test { test {
+3 -5
View File
@@ -47,11 +47,9 @@ def platformManager = new PlatformManager(DistributionKt.buildDistribution(Utils
def kotlinDist = null def kotlinDist = null
if (hasProperty("kotlin_dist")) { if (hasProperty("kotlin_dist")) {
kotlinDist = file(findProperty("kotlin_dist")) kotlinDist = file(findProperty("kotlin_dist"))
ext["notationMapping"] = [':kotlin-stdlib-common' : project.file("${kotlinDist}/kotlinc/lib/kotlin-stdlib.jar").absolutePath, ext["notationMapping"] = [':kotlin-stdlib-common' : project.file("${kotlinDist}/kotlinc/lib/kotlin-stdlib.jar").absolutePath,
':kotlin-test:kotlin-test-common' : project.file("${kotlinDist}/kotlinc/lib/kotlin-test.jar").absolutePath, ':kotlin-test' : project.file("${kotlinDist}/kotlinc/lib/kotlin-test.jar").absolutePath,
':kotlin-test:kotlin-test-annotations-common': project.file("${kotlinDist}/kotlinc/lib/kotlin-test.jar").absolutePath, ':kotlin-stdlib-jdk8' : project.file("${kotlinDist}/kotlinc/lib/kotlin-stdlib-jdk8.jar").absolutePath]
':kotlin-test:kotlin-test-junit' : project.file("${kotlinDist}/kotlinc/lib/kotlin-test-junit.jar").absolutePath,
':kotlin-stdlib-jdk8' : project.file("${kotlinDist}/kotlinc/lib/kotlin-stdlib-jdk8.jar").absolutePath]
ext.targetList = [] ext.targetList = []
} }
@@ -56,7 +56,7 @@ dependencies {
kotlinNativeJavadoc(project(":kotlin-native:backend.native")) kotlinNativeJavadoc(project(":kotlin-native:backend.native"))
testImplementation(libs.junit4) testImplementation(libs.junit4)
testImplementation(project(":kotlin-test:kotlin-test-junit")) testImplementation(kotlinTest("junit"))
} }
val compiler = embeddableCompiler("kotlin-native-compiler-embeddable") { val compiler = embeddableCompiler("kotlin-native-compiler-embeddable") {
@@ -17,8 +17,6 @@ dependencies {
// Use this dependency instead when building apart from the other modules: // Use this dependency instead when building apart from the other modules:
// compile "org.jetbrains.kotlin:kotlin-gradle-plugin-api:$kotlin_version" // compile "org.jetbrains.kotlin:kotlin-gradle-plugin-api:$kotlin_version"
api project(':kotlin-test:kotlin-test-junit')
compileOnly RepoDependencies.kotlinStdlib(project) compileOnly RepoDependencies.kotlinStdlib(project)
compileOnly project(':compiler') compileOnly project(':compiler')
compileOnly project(':compiler:plugin-api') compileOnly project(':compiler:plugin-api')
@@ -44,7 +44,7 @@ dependencies {
embedded(project(":core:metadata")) embedded(project(":core:metadata"))
embedded(project(":core:metadata.jvm")) embedded(project(":core:metadata.jvm"))
embedded(protobufLite()) embedded(protobufLite())
testImplementation(project(":kotlin-test:kotlin-test-junit")) testImplementation(kotlinTest("junit"))
testImplementation(libs.junit4) testImplementation(libs.junit4)
testImplementation(commonDependency("org.jetbrains.intellij.deps:asm-all")) testImplementation(commonDependency("org.jetbrains.intellij.deps:asm-all"))
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false } testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
@@ -25,8 +25,7 @@ dependencies {
testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps", "trove4j")) testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps", "trove4j"))
embeddableTestRuntime(project(":kotlin-scripting-jvm-host")) embeddableTestRuntime(project(":kotlin-scripting-jvm-host"))
embeddableTestRuntime(project(":kotlin-test:kotlin-test-jvm")) embeddableTestRuntime(kotlinTest("junit"))
embeddableTestRuntime(project(":kotlin-test:kotlin-test-junit"))
embeddableTestRuntime(projectTests(":compiler:tests-common")) { isTransitive = false } embeddableTestRuntime(projectTests(":compiler:tests-common")) { isTransitive = false }
embeddableTestRuntime(testSourceSet.output) embeddableTestRuntime(testSourceSet.output)
} }
@@ -8,7 +8,7 @@ dependencies {
api("org.jetbrains.kotlinx:binary-compatibility-validator:0.13.0") api("org.jetbrains.kotlinx:binary-compatibility-validator:0.13.0")
api("org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.7.0") api("org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.7.0")
testApi project(':kotlin-test:kotlin-test-junit') testApi RepoDependencies.kotlinTest(project, "junit")
testArtifacts project(':kotlin-stdlib') testArtifacts project(':kotlin-stdlib')
testArtifacts project(':kotlin-stdlib-jdk7') testArtifacts project(':kotlin-stdlib-jdk7')
@@ -18,7 +18,7 @@ dependencies {
implementation("org.codehaus.mojo:animal-sniffer:1.21") implementation("org.codehaus.mojo:animal-sniffer:1.21")
implementation(kotlinStdlib()) implementation(kotlinStdlib())
testImplementation(project(":kotlin-test:kotlin-test-junit")) testImplementation(kotlinTest("junit"))
testArtifacts(project(":kotlin-reflect")) testArtifacts(project(":kotlin-reflect"))
@@ -17,7 +17,7 @@ extensions.extraProperties["kotlin.stdlib.default.dependency"] = "false"
dependencies { dependencies {
compileOnly(kotlinStdlib()) compileOnly(kotlinStdlib())
testImplementation(project(":kotlin-test:kotlin-test-junit")) testImplementation(kotlinTest("junit"))
testImplementation(libs.junit4) testImplementation(libs.junit4)
} }
@@ -25,7 +25,7 @@ dependencies {
api(project(":kotlin-gradle-plugin-idea")) api(project(":kotlin-gradle-plugin-idea"))
embedded("com.google.protobuf:protobuf-java:3.21.9") embedded("com.google.protobuf:protobuf-java:3.21.9")
embedded("com.google.protobuf:protobuf-kotlin:3.21.9") embedded("com.google.protobuf:protobuf-kotlin:3.21.9")
testImplementation(project(":kotlin-test:kotlin-test-junit")) testImplementation(kotlinTest("junit"))
testImplementation(kotlin("reflect")) testImplementation(kotlin("reflect"))
testImplementation(testFixtures(project(":kotlin-gradle-plugin-idea"))) testImplementation(testFixtures(project(":kotlin-gradle-plugin-idea")))
} }
@@ -30,7 +30,7 @@ dependencies {
testImplementation(gradleKotlinDsl()) testImplementation(gradleKotlinDsl())
testImplementation(project(":kotlin-gradle-plugin")) testImplementation(project(":kotlin-gradle-plugin"))
testImplementation(project(":kotlin-gradle-plugin-idea-proto")) testImplementation(project(":kotlin-gradle-plugin-idea-proto"))
testImplementation(project(":kotlin-test:kotlin-test-junit")) testImplementation(kotlinTest("junit"))
testImplementation("org.reflections:reflections:0.10.2") { testImplementation("org.reflections:reflections:0.10.2") {
because("Tests on the object graph are performed. This library will find implementations of interfaces at runtime") because("Tests on the object graph are performed. This library will find implementations of interfaces at runtime")
@@ -40,7 +40,7 @@ dependencies {
testFixturesImplementation(gradleKotlinDsl()) testFixturesImplementation(gradleKotlinDsl())
testFixturesImplementation(project(":kotlin-tooling-core")) testFixturesImplementation(project(":kotlin-tooling-core"))
testFixturesImplementation(project(":kotlin-gradle-plugin-idea-proto")) testFixturesImplementation(project(":kotlin-gradle-plugin-idea-proto"))
testFixturesImplementation(project(":kotlin-test:kotlin-test-junit")) testFixturesImplementation(kotlinTest()) // no test annotations, only assertions are needed
} }
@@ -63,7 +63,7 @@ dependencies {
testImplementation(project(":kotlin-tooling-metadata")) testImplementation(project(":kotlin-tooling-metadata"))
testImplementation(kotlinGradlePluginTest) testImplementation(kotlinGradlePluginTest)
testImplementation(project(":kotlin-gradle-subplugin-example")) testImplementation(project(":kotlin-gradle-subplugin-example"))
testImplementation(project(":kotlin-test:kotlin-test-jvm")) testImplementation(kotlinTest("junit"))
testImplementation(project(":kotlin-util-klib")) testImplementation(project(":kotlin-util-klib"))
testImplementation(project(":native:kotlin-native-utils")) testImplementation(project(":native:kotlin-native-utils"))
@@ -100,9 +100,6 @@ dependencies {
testRuntimeOnly(project(":compiler:tests-mutes")) testRuntimeOnly(project(":compiler:tests-mutes"))
// Workaround for missing transitive import of the common(project `kotlin-test-common`
// for `kotlin-test-jvm` into the IDE:
testCompileOnly(project(":kotlin-test:kotlin-test-common")) { isTransitive = false }
testCompileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all")) testCompileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all"))
} }
@@ -120,7 +120,7 @@ dependencies {
testImplementation(commonDependency("org.jetbrains.teamcity:serviceMessages")) testImplementation(commonDependency("org.jetbrains.teamcity:serviceMessages"))
testImplementation(projectTests(":kotlin-build-common")) testImplementation(projectTests(":kotlin-build-common"))
testImplementation(project(":kotlin-compiler-runner")) testImplementation(project(":kotlin-compiler-runner"))
testImplementation(project(":kotlin-test:kotlin-test-junit")) testImplementation(kotlinTest("junit"))
testImplementation(libs.junit4) testImplementation(libs.junit4)
testImplementation(project(":kotlin-gradle-statistics")) testImplementation(project(":kotlin-gradle-statistics"))
testImplementation(project(":kotlin-tooling-metadata")) testImplementation(project(":kotlin-tooling-metadata"))
@@ -17,7 +17,7 @@ extensions.extraProperties["kotlin.stdlib.default.dependency"] = "false"
dependencies { dependencies {
compileOnly(kotlinStdlib()) compileOnly(kotlinStdlib())
testImplementation(project(":kotlin-test:kotlin-test-junit")) testImplementation(kotlinTest("junit"))
testImplementation(libs.junit4) testImplementation(libs.junit4)
} }
@@ -12,7 +12,7 @@ configureKotlinCompileTasksGradleCompatibility()
dependencies { dependencies {
api(platform(project(":kotlin-gradle-plugins-bom"))) api(platform(project(":kotlin-gradle-plugins-bom")))
compileOnly(kotlinStdlib()) compileOnly(kotlinStdlib())
testImplementation(project(":kotlin-test:kotlin-test-junit")) testImplementation(kotlinTest("junit"))
} }
tasks { tasks {
@@ -12,5 +12,5 @@ configureKotlinCompileTasksGradleCompatibility()
dependencies { dependencies {
implementation(kotlinStdlib()) implementation(kotlinStdlib())
implementation(commonDependency("com.google.code.gson:gson")) implementation(commonDependency("com.google.code.gson:gson"))
testImplementation(project(":kotlin-test:kotlin-test-junit")) testImplementation(kotlinTest("junit"))
} }
+1 -1
View File
@@ -12,7 +12,7 @@ publish()
dependencies { dependencies {
implementation(kotlinStdlib()) implementation(kotlinStdlib())
implementation(project(":native:kotlin-native-utils")) implementation(project(":native:kotlin-native-utils"))
testImplementation(project(":kotlin-test::kotlin-test-junit")) testImplementation(kotlinTest("junit"))
testImplementation(libs.junit4) testImplementation(libs.junit4)
testImplementation(projectTests(":compiler:tests-common")) testImplementation(projectTests(":compiler:tests-common"))
testRuntimeOnly(project(":native:kotlin-klib-commonizer")) testRuntimeOnly(project(":native:kotlin-klib-commonizer"))
@@ -36,7 +36,7 @@ dependencies {
testApi(project(":compiler:cli")) testApi(project(":compiler:cli"))
testApi(project(":kotlin-android-extensions-runtime")) testApi(project(":kotlin-android-extensions-runtime"))
testApi(projectTests(":compiler:tests-common")) testApi(projectTests(":compiler:tests-common"))
testApi(project(":kotlin-test:kotlin-test-jvm")) testApi(kotlinTest("junit"))
testImplementation(libs.junit4) testImplementation(libs.junit4)
robolectricDependency("org.robolectric:android-all:5.0.2_r3-robolectric-r0") robolectricDependency("org.robolectric:android-all:5.0.2_r3-robolectric-r0")
@@ -84,7 +84,7 @@ dependencies {
testImplementation(projectTests(":js:js.tests")) testImplementation(projectTests(":js:js.tests"))
testImplementation(libs.junit4) testImplementation(libs.junit4)
testApi(project(":kotlin-test:kotlin-test-jvm")) testApi(kotlinTest())
// Dependencies for Kotlin/Native test infra: // Dependencies for Kotlin/Native test infra:
if (!kotlinBuildProperties.isInIdeaSync) { if (!kotlinBuildProperties.isInIdeaSync) {
@@ -34,7 +34,7 @@ dependencies {
testApi(project(":compiler:cli")) testApi(project(":compiler:cli"))
testApi(project(":plugins:parcelize:parcelize-runtime")) testApi(project(":plugins:parcelize:parcelize-runtime"))
testApi(project(":kotlin-android-extensions-runtime")) testApi(project(":kotlin-android-extensions-runtime"))
testApi(project(":kotlin-test:kotlin-test-jvm")) testApi(kotlinTest())
testApi(projectTests(":compiler:tests-common-new")) testApi(projectTests(":compiler:tests-common-new"))
testApi(projectTests(":compiler:test-infrastructure")) testApi(projectTests(":compiler:test-infrastructure"))
@@ -22,8 +22,7 @@ dependencies {
testApi(project(":daemon-common")) testApi(project(":daemon-common"))
testApi(project(":kotlin-daemon-client")) testApi(project(":kotlin-daemon-client"))
testImplementation(libs.junit4) testImplementation(libs.junit4)
testApi(project(":kotlin-test:kotlin-test-jvm")) testApi(kotlinTest("junit"))
testApi(project(":kotlin-test:kotlin-test-junit"))
testCompilerClasspath(project(":kotlin-compiler")) testCompilerClasspath(project(":kotlin-compiler"))
testCompilerClasspath(commonDependency("org.jetbrains.intellij.deps", "trove4j")) testCompilerClasspath(commonDependency("org.jetbrains.intellij.deps", "trove4j"))
testCompilerClasspath(project(":kotlin-scripting-compiler")) testCompilerClasspath(project(":kotlin-scripting-compiler"))
+1 -1
View File
@@ -23,7 +23,7 @@ dependencies {
runtimeOnly(project(":kotlin-daemon-embeddable")) runtimeOnly(project(":kotlin-daemon-embeddable"))
runtimeOnly(commonDependency("org.jetbrains.intellij.deps", "trove4j")) runtimeOnly(commonDependency("org.jetbrains.intellij.deps", "trove4j"))
testImplementation(libs.junit4) testImplementation(libs.junit4)
testApi(project(":kotlin-test:kotlin-test-junit")) testApi(kotlinTest("junit"))
testCompilationClasspath(kotlinStdlib()) testCompilationClasspath(kotlinStdlib())
} }
+1 -1
View File
@@ -4,7 +4,7 @@ plugins {
dependencies { dependencies {
testImplementation(kotlinStdlib("jdk8")) testImplementation(kotlinStdlib("jdk8"))
testImplementation(project(":kotlin-test:kotlin-test-junit5")) testImplementation(kotlinTest("junit5"))
testApi(platform(libs.junit.bom)) testApi(platform(libs.junit.bom))
testImplementation(libs.junit.jupiter.api) testImplementation(libs.junit.jupiter.api)
testRuntimeOnly(libs.junit.jupiter.engine) testRuntimeOnly(libs.junit.jupiter.engine)
@@ -52,7 +52,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jetbrains.kotlin</groupId> <groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test-junit</artifactId> <artifactId>kotlin-test</artifactId>
<version>ArtifactsTest.version</version> <version>ArtifactsTest.version</version>
<scope>runtime</scope> <scope>runtime</scope>
<optional>true</optional> <optional>true</optional>
@@ -74,7 +74,9 @@ fun Project.kotlinStdlib(suffix: String? = null, classifier: String? = null): An
*/ */
@JvmOverloads @JvmOverloads
fun Project.kotlinTest(suffix: String? = null, classifier: String? = null): Any { fun Project.kotlinTest(suffix: String? = null, classifier: String? = null): Any {
return run { return if (kotlinBuildProperties.isJpsBuildEnabled) {
kotlinDep(listOfNotNull("test", suffix?.lowercase()).joinToString("-"), bootstrapKotlinVersion, classifier)
} else {
val elementsType = when (classifier) { val elementsType = when (classifier) {
null -> "Runtime" null -> "Runtime"
"sources" -> "Sources" "sources" -> "Sources"
+1 -2
View File
@@ -55,8 +55,7 @@ dependencies {
implementation(kotlinStdlib()) implementation(kotlinStdlib())
implementation(kotlinxCollectionsImmutable()) implementation(kotlinxCollectionsImmutable())
testImplementation(libs.junit4) testImplementation(libs.junit4)
testCompileOnly(project(":kotlin-test:kotlin-test-jvm")) testCompileOnly(kotlinTest("junit"))
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
testImplementation(projectTests(":compiler:tests-common")) testImplementation(projectTests(":compiler:tests-common"))
testImplementation(commonDependency("org.jetbrains.kotlinx", "kotlinx-serialization-json")) testImplementation(commonDependency("org.jetbrains.kotlinx", "kotlinx-serialization-json"))