From 735979023bb4674fc0d7cce49d592354463b1c0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonard=20Br=C3=BCnings?= Date: Wed, 19 May 2021 13:52:15 +0200 Subject: [PATCH] Update to Spock 2.0, Gradle 7.0.2, Maven 3.8.1 --- .gitignore | 2 -- .mvn/wrapper/maven-wrapper.properties | 2 +- build.gradle | 26 ++++++++---------------- gradle/ide.gradle | 20 ------------------ gradle/wrapper/gradle-wrapper.properties | 5 +++-- pom.xml | 8 ++++---- 6 files changed, 17 insertions(+), 46 deletions(-) delete mode 100644 gradle/ide.gradle diff --git a/.gitignore b/.gitignore index de3e2bc..ffd40da 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ -# All directories should end in / (information used by ide.gradle) - # Ant ant/ diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index be4fea7..c6046c0 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -1 +1 @@ -distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip +distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip diff --git a/build.gradle b/build.gradle index 2530d20..f60741a 100755 --- a/build.gradle +++ b/build.gradle @@ -15,29 +15,21 @@ repositories { dependencies { // mandatory dependencies for using Spock - compile "org.codehaus.groovy:groovy:3.0.7" - testCompile platform("org.spockframework:spock-bom:2.0-M4-groovy-3.0") - testCompile "org.spockframework:spock-core" - testCompile "org.spockframework:spock-junit4" // you can remove this if your code does not rely on old JUnit 4 rules + implementation "org.codehaus.groovy:groovy:3.0.8" + testImplementation platform("org.spockframework:spock-bom:2.0-groovy-3.0") + testImplementation "org.spockframework:spock-core" + testImplementation "org.spockframework:spock-junit4" // you can remove this if your code does not rely on old JUnit 4 rules // optional dependencies for using Spock - testCompile "org.hamcrest:hamcrest-core:2.2" // only necessary if Hamcrest matchers are used - testRuntime "net.bytebuddy:byte-buddy:1.10.10" // allows mocking of classes (in addition to interfaces) - testRuntime "org.objenesis:objenesis:3.1" // allows mocking of classes without default constructor (together with ByteBuddy or CGLIB) + testImplementation "org.hamcrest:hamcrest-core:2.2" // only necessary if Hamcrest matchers are used + testRuntimeOnly "net.bytebuddy:byte-buddy:1.11.0" // allows mocking of classes (in addition to interfaces) + testRuntimeOnly "org.objenesis:objenesis:3.2" // allows mocking of classes without default constructor (together with ByteBuddy or CGLIB) // dependencies used by examples in this project - testRuntime "com.h2database:h2:1.4.197" - compile "org.codehaus.groovy:groovy-sql:3.0.7" + testRuntimeOnly "com.h2database:h2:1.4.197" + implementation "org.codehaus.groovy:groovy-sql:3.0.8" } -// the remaining configuration is specific to this project, and is not required for using Spock - -apply from: "gradle/ide.gradle" - -task collectJars(type: Copy) { - into "$buildDir/output/lib" - from configurations.testRuntime -} test { useJUnitPlatform() testLogging { diff --git a/gradle/ide.gradle b/gradle/ide.gradle deleted file mode 100644 index 5ef6b2a..0000000 --- a/gradle/ide.gradle +++ /dev/null @@ -1,20 +0,0 @@ -apply plugin: "idea" -apply plugin: "eclipse" - -def gitIgnore = file(".gitignore").readLines() -def gitIgnoreDirs = gitIgnore*.trim().findAll { !it.startsWith("#") && it.endsWith("/") } - -idea { - project { - jdkName "1.6" - configure(modules) { - excludeDirs = files(gitIgnoreDirs) as Set - } - ipr { - withXml { provider -> - def node = provider.asNode() - node.component.find { it.'@name' == 'VcsDirectoryMappings' }?.mapping[0].'@vcs' = 'Git' - } - } - } -} \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8174453..5d0bf73 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=3239b5ed86c3838a37d983ac100573f64c1f3fd8e1eb6c89fa5f9529b5ec091d -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip +# You can get the official checksums from https://gradle.org/release-checksums/ +distributionSha256Sum=0e46229820205440b48a5501122002842b82886e76af35f0f3a069243dca4b3c +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/pom.xml b/pom.xml index 89ce5f2..4e6e702 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ UTF-8 UTF-8 - 3.0.7 + 3.0.8 @@ -62,7 +62,7 @@ org.spockframework spock-bom - 2.0-M5-groovy-3.0 + 2.0-groovy-3.0 pom import @@ -90,13 +90,13 @@ net.bytebuddy byte-buddy - 1.10.10 + 1.11.0 test org.objenesis objenesis - 3.1 + 3.2 test