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
@@ -17,8 +17,6 @@ dependencies {
// Use this dependency instead when building apart from the other modules:
// compile "org.jetbrains.kotlin:kotlin-gradle-plugin-api:$kotlin_version"
api project(':kotlin-test:kotlin-test-junit')
compileOnly RepoDependencies.kotlinStdlib(project)
compileOnly project(':compiler')
compileOnly project(':compiler:plugin-api')
@@ -44,7 +44,7 @@ dependencies {
embedded(project(":core:metadata"))
embedded(project(":core:metadata.jvm"))
embedded(protobufLite())
testImplementation(project(":kotlin-test:kotlin-test-junit"))
testImplementation(kotlinTest("junit"))
testImplementation(libs.junit4)
testImplementation(commonDependency("org.jetbrains.intellij.deps:asm-all"))
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
@@ -25,8 +25,7 @@ dependencies {
testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps", "trove4j"))
embeddableTestRuntime(project(":kotlin-scripting-jvm-host"))
embeddableTestRuntime(project(":kotlin-test:kotlin-test-jvm"))
embeddableTestRuntime(project(":kotlin-test:kotlin-test-junit"))
embeddableTestRuntime(kotlinTest("junit"))
embeddableTestRuntime(projectTests(":compiler:tests-common")) { isTransitive = false }
embeddableTestRuntime(testSourceSet.output)
}
@@ -8,7 +8,7 @@ dependencies {
api("org.jetbrains.kotlinx:binary-compatibility-validator:0.13.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-jdk7')
@@ -18,7 +18,7 @@ dependencies {
implementation("org.codehaus.mojo:animal-sniffer:1.21")
implementation(kotlinStdlib())
testImplementation(project(":kotlin-test:kotlin-test-junit"))
testImplementation(kotlinTest("junit"))
testArtifacts(project(":kotlin-reflect"))
@@ -17,7 +17,7 @@ extensions.extraProperties["kotlin.stdlib.default.dependency"] = "false"
dependencies {
compileOnly(kotlinStdlib())
testImplementation(project(":kotlin-test:kotlin-test-junit"))
testImplementation(kotlinTest("junit"))
testImplementation(libs.junit4)
}
@@ -25,7 +25,7 @@ dependencies {
api(project(":kotlin-gradle-plugin-idea"))
embedded("com.google.protobuf:protobuf-java: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(testFixtures(project(":kotlin-gradle-plugin-idea")))
}
@@ -30,7 +30,7 @@ dependencies {
testImplementation(gradleKotlinDsl())
testImplementation(project(":kotlin-gradle-plugin"))
testImplementation(project(":kotlin-gradle-plugin-idea-proto"))
testImplementation(project(":kotlin-test:kotlin-test-junit"))
testImplementation(kotlinTest("junit"))
testImplementation("org.reflections:reflections:0.10.2") {
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(project(":kotlin-tooling-core"))
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(kotlinGradlePluginTest)
testImplementation(project(":kotlin-gradle-subplugin-example"))
testImplementation(project(":kotlin-test:kotlin-test-jvm"))
testImplementation(kotlinTest("junit"))
testImplementation(project(":kotlin-util-klib"))
testImplementation(project(":native:kotlin-native-utils"))
@@ -100,9 +100,6 @@ dependencies {
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"))
}
@@ -120,7 +120,7 @@ dependencies {
testImplementation(commonDependency("org.jetbrains.teamcity:serviceMessages"))
testImplementation(projectTests(":kotlin-build-common"))
testImplementation(project(":kotlin-compiler-runner"))
testImplementation(project(":kotlin-test:kotlin-test-junit"))
testImplementation(kotlinTest("junit"))
testImplementation(libs.junit4)
testImplementation(project(":kotlin-gradle-statistics"))
testImplementation(project(":kotlin-tooling-metadata"))
@@ -17,7 +17,7 @@ extensions.extraProperties["kotlin.stdlib.default.dependency"] = "false"
dependencies {
compileOnly(kotlinStdlib())
testImplementation(project(":kotlin-test:kotlin-test-junit"))
testImplementation(kotlinTest("junit"))
testImplementation(libs.junit4)
}
@@ -12,7 +12,7 @@ configureKotlinCompileTasksGradleCompatibility()
dependencies {
api(platform(project(":kotlin-gradle-plugins-bom")))
compileOnly(kotlinStdlib())
testImplementation(project(":kotlin-test:kotlin-test-junit"))
testImplementation(kotlinTest("junit"))
}
tasks {
@@ -12,5 +12,5 @@ configureKotlinCompileTasksGradleCompatibility()
dependencies {
implementation(kotlinStdlib())
implementation(commonDependency("com.google.code.gson:gson"))
testImplementation(project(":kotlin-test:kotlin-test-junit"))
testImplementation(kotlinTest("junit"))
}