1- import buildlogic.getLibrary
21import buildlogic.stringyLibs
2+ import buildlogic.getLibrary
33
44plugins {
55 id(" eclipse" )
@@ -8,9 +8,6 @@ plugins {
88 id(" buildlogic.common" )
99}
1010
11- val commonJava = extensions.create< buildlogic.CommonJavaExtension > (" commonJava" )
12- commonJava.banSlf4j.convention(true )
13-
1411tasks
1512 .withType<JavaCompile >()
1613 .matching { it.name == " compileJava" || it.name == " compileTestJava" }
2320 options.isDeprecation = true
2421 options.encoding = " UTF-8"
2522 options.compilerArgs.add(" -parameters" )
26- // options.compilerArgs.add("-Werror")
23+ // options.compilerArgs.add("-Werror")
2724 }
2825
2926configure<CheckstyleExtension > {
@@ -32,7 +29,9 @@ configure<CheckstyleExtension> {
3229}
3330
3431tasks.withType<Test >().configureEach {
35- useJUnitPlatform()
32+ useJUnitPlatform {
33+ includeEngines(" junit-jupiter" )
34+ }
3635}
3736
3837dependencies {
@@ -44,13 +43,14 @@ dependencies {
4443 " testImplementation" (stringyLibs.getLibrary(" mockito-core" ))
4544 " testImplementation" (stringyLibs.getLibrary(" mockito-junit-jupiter" ))
4645 " testRuntimeOnly" (stringyLibs.getLibrary(" junit-jupiter-engine" ))
46+ " testRuntimeOnly" (stringyLibs.getLibrary(" junit-platform-launcher" ))
4747}
4848
4949// Java 8 turns on doclint which we fail
5050tasks.withType<Javadoc >().configureEach {
5151 options.encoding = " UTF-8"
5252 (options as StandardJavadocDocletOptions ).apply {
53- // addBooleanOption("Werror", true)
53+ // addBooleanOption("Werror", true)
5454 addBooleanOption(" Xdoclint:all" , true )
5555 addBooleanOption(" Xdoclint:-missing" , true )
5656 tags(
@@ -66,16 +66,6 @@ configure<JavaPluginExtension> {
6666 withSourcesJar()
6767}
6868
69- configurations[" compileClasspath" ].apply {
70- resolutionStrategy.componentSelection {
71- withModule(" org.slf4j:slf4j-api" ) {
72- if (commonJava.banSlf4j.get()) {
73- reject(" No SLF4J allowed on compile classpath" )
74- }
75- }
76- }
77- }
78-
7969tasks.named(" check" ).configure {
8070 dependsOn(" checkstyleMain" , " checkstyleTest" )
8171}
0 commit comments