Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update JUnit dependencies #4505

Merged
merged 3 commits into from Jan 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions build-logic/src/main/kotlin/module.gradle.kts
Expand Up @@ -17,9 +17,9 @@ tasks.withType<Jar>().configureEach {
}
}

val catalogs = project.extensions.getByType(VersionCatalogsExtension::class)
val versionCatalog = project.extensions.getByType<VersionCatalogsExtension>().named("libs")

jacoco.toolVersion = catalogs.named("libs").findVersion("jacoco").get().requiredVersion
jacoco.toolVersion = versionCatalog.findVersion("jacoco").get().requiredVersion

tasks.withType<Test>().configureEach {
useJUnitPlatform()
Expand Down Expand Up @@ -96,7 +96,7 @@ tasks.withType<KotlinCompile>().configureEach {
testing {
suites {
val test by getting(JvmTestSuite::class) {
useJUnitJupiter()
useJUnitJupiter(versionCatalog.findVersion("junit").get().requiredVersion)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions custom-checks/build.gradle.kts
Expand Up @@ -5,6 +5,6 @@ plugins {
dependencies {
implementation(projects.detektApi)
testImplementation(projects.detektTest)
testImplementation(libs.bundles.testImplementation)
testRuntimeOnly(libs.spek.runner)
testImplementation(libs.assertj)
testRuntimeOnly(libs.spek.dsl)
}
3 changes: 1 addition & 2 deletions detekt-generator/build.gradle.kts
Expand Up @@ -14,8 +14,7 @@ dependencies {

testImplementation(projects.detektCore)
testImplementation(projects.detektTestUtils)
testImplementation(libs.bundles.testImplementation)
testRuntimeOnly(libs.spek.runner)
testImplementation(libs.assertj)
testImplementation(libs.reflections)
}

Expand Down
2 changes: 2 additions & 0 deletions detekt-gradle-plugin/build.gradle.kts
Expand Up @@ -39,6 +39,8 @@ testing {
}
}
register("functionalTest", JvmTestSuite::class) {
useJUnitJupiter(libs.versions.junit.get())

dependencies {
implementation(libs.assertj)
implementation(libs.spek.dsl)
Expand Down
3 changes: 1 addition & 2 deletions gradle/libs.versions.toml
Expand Up @@ -34,7 +34,6 @@ spek-dsl = { module = "org.spekframework.spek2:spek-dsl-jvm", version.ref = "spe
spek-runner = { module = "org.spekframework.spek2:spek-runner-junit5", version.ref = "spek" }

junit-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" }
junit-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junit" }

sarif4k = "io.github.detekt.sarif4k:sarif4k:0.0.1"
assertj = "org.assertj:assertj-core:3.20.2"
Expand All @@ -53,4 +52,4 @@ shadow = { id = "com.github.johnrengelman.shadow", version = "7.1.2" }
sonarqube = { id = "org.sonarqube", version = "3.3" }

[bundles]
testImplementation = ["assertj", "spek-dsl", "junit-params"]
testImplementation = ["assertj", "spek-dsl"]