Improve JUnit dependencies

This commit groups the testImplementation and testRuntimeOnly
dependencies. It also depends on junit-jupiter-engine specifically at
test runtime, rather than all of junit-jupiter. This is the
configuration shown in the JUnit documentation.

Signed-off-by: Graham <gpe@openrs2.org>
Graham 4 years ago
parent c295ecb0a0
commit 9b409c8331
  1. 10
      build.gradle.kts

@ -128,6 +128,9 @@ configure(subprojects.filter { it.isFree }) {
strictly(Versions.junit) strictly(Versions.junit)
} }
} }
val testRuntimeOnly by configurations
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${Versions.junit}")
} }
} }
@ -219,13 +222,6 @@ configure(subprojects.filter { it.isFree }) {
} }
} }
plugins.withType<JavaPlugin> {
dependencies {
val testRuntimeOnly by configurations
testRuntimeOnly("org.junit.jupiter:junit-jupiter:${Versions.junit}")
}
}
plugins.withType<ApplicationPlugin> { plugins.withType<ApplicationPlugin> {
dependencies { dependencies {
val runtimeOnly by configurations val runtimeOnly by configurations

Loading…
Cancel
Save