From c6bcbbb3723bc242d5037a09be279b5b70552aa6 Mon Sep 17 00:00:00 2001 From: Nick dos Remedios Date: Thu, 16 Jan 2025 12:17:29 +1100 Subject: [PATCH] #937 Gradle config fixes for Spock tests to run --- build.gradle | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index ff67edaec..704fe167a 100644 --- a/build.gradle +++ b/build.gradle @@ -21,6 +21,7 @@ plugins { id "com.gorylenko.gradle-git-properties" version "2.4.1" id 'jacoco' id 'com.github.kt3k.coveralls' version '2.12.0' + id 'groovy' // id "com.github.nbaztec.coveralls-jacoco" version "1.2.15" } @@ -125,27 +126,28 @@ dependencies { implementation 'org.springframework.boot:spring-boot-autoconfigure:2.7.0' if (inplace) { - implementation project(':ala-ws-spring-security') implementation project(':ala-ws-security') - } else { - implementation 'au.org.ala:ala-ws-spring-security:6.3.0-SNAPSHOT' } implementation 'org.codehaus.groovy:groovy-all:3.0.11' - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0' - testImplementation 'org.junit.jupiter:junit-jupiter-migrationsupport:5.7.0' - testImplementation 'org.junit.vintage:junit-vintage-engine:5.7.0' + testImplementation 'org.codehaus.groovy:groovy-all:3.0.11' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.1' + testImplementation 'org.junit.jupiter:junit-jupiter-migrationsupport:5.9.1' + testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.9.1' + testImplementation 'org.junit.platform:junit-platform-launcher' + testImplementation 'org.junit.platform:junit-platform-commons' + testImplementation 'org.junit.vintage:junit-vintage-engine:5.9.1' +// testImplementation 'junit:junit:4.13.1' testImplementation 'org.apiguardian:apiguardian-api:1.1.0' - testImplementation 'junit:junit:4.13.1' testImplementation 'org.mockito:mockito-core:3.4.4' testImplementation 'org.powermock:powermock-module-junit4:2.0.7' testImplementation 'org.powermock:powermock-api-mockito2:2.0.7' - testImplementation 'org.spockframework:spock-core:2.0-groovy-2.5' - testImplementation 'org.spockframework:spock-spring:2.0-groovy-2.5' + testImplementation 'org.spockframework:spock-core:2.3-groovy-3.0' + testImplementation 'org.spockframework:spock-spring:2.3-groovy-3.0' testImplementation 'net.bytebuddy:byte-buddy:1.10.13' testImplementation 'org.hamcrest:hamcrest:2.1' testImplementation 'org.hamcrest:hamcrest-library:2.1' @@ -161,7 +163,19 @@ dependencies { providedRuntime 'org.glassfish:javax.el:3.0.0' } +sourceSets { + test { + groovy { + srcDirs = ['src/test/java'] + } + java { + srcDirs = ['src/test/java'] + } + } +} + test { + useJUnitPlatform() testLogging { events "passed", "skipped", "failed" exceptionFormat "full"