diff --git a/build.gradle b/build.gradle index 908656e264..6b5f37f061 100644 --- a/build.gradle +++ b/build.gradle @@ -49,12 +49,12 @@ ext { } groovyDependencies = [ - [group: groovyGroup, name: "groovy", version: groovyVersion] + dependencyFactory.create(groovyGroup, "groovy", groovyVersion) ] groovyConsoleExtraDependencies = [ - [group: groovyGroup, name: "groovy-console", version: groovyVersion], - [group: groovyGroup, name: "groovy-test-junit5", version: groovyVersion], // for executing specs - [group: "org.apache.ivy", name: "ivy", version: "2.5.3"] // for @Grab support + dependencyFactory.create(groovyGroup, "groovy-console", groovyVersion), + dependencyFactory.create(groovyGroup, "groovy-test-junit5", groovyVersion), // for executing specs + dependencyFactory.create("org.apache.ivy", "ivy", "2.5.3"), // For @Grab support ] maxGroovyVersion = snapshotVersion ? "9.9.99" : maxGroovyVersion if (System.getProperty("groovyVersion")) { diff --git a/gradle/publishMaven.gradle b/gradle/publishMaven.gradle index e0f6534ca0..18edbb8648 100644 --- a/gradle/publishMaven.gradle +++ b/gradle/publishMaven.gradle @@ -8,15 +8,13 @@ ext { publishing { publications { maven(MavenPublication) { - afterEvaluate { - pom.packaging = project.ext.packaging - if (project.ext.packaging == "pom") { - from(components.javaPlatform) - } else { - from(components.java) - artifact(sourcesJar) - artifact(javadocJar) - } + pluginManager.withPlugin("java-library") { + from(components.java) + artifact(sourcesJar) + artifact(javadocJar) + } + pluginManager.withPlugin("java-platform") { + from(components.javaPlatform) } pom { name = provider { project.ext.displayName } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 1b33c55baa..8bdaf60c75 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 78cb6e16a4..6a38a8cea6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=bd71102213493060956ec229d946beee57158dbd89d0e62b91bca0fa2c5f3531 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip +distributionSha256Sum=a17ddd85a26b6a7f5ddb71ff8b05fc5104c0202c6e64782429790c933686c806 +distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index 23d15a9367..adff685a03 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -114,7 +114,6 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -172,7 +171,6 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) JAVACMD=$( cygpath --unix "$JAVACMD" ) @@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" diff --git a/gradlew.bat b/gradlew.bat index db3a6ac207..c4bdd3ab8e 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -70,11 +70,10 @@ goto fail :execute @rem Setup the command line -set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/spock-core/core.gradle b/spock-core/core.gradle index 0bc05f9684..9ca5447d75 100644 --- a/spock-core/core.gradle +++ b/spock-core/core.gradle @@ -47,13 +47,14 @@ dependencies { tasks.named("jar", Jar) { + def projName = project.name manifest { attributes( 'Build-Revision': versioning.info.commit, - 'Specification-Title': project.name, + 'Specification-Title': projName, 'Specification-Version': baseVersion, 'Specification-Vendor': 'spockframework.org', - 'Implementation-Title': project.name, + 'Implementation-Title': projName, 'Implementation-Version': variantLessVersion, 'Implementation-Vendor': 'spockframework.org', 'Automatic-Module-Name': 'org.spockframework.core' diff --git a/spock-spring/boot2-test/boot2-test.gradle b/spock-spring/boot2-test/boot2-test.gradle index 83b6436f3c..876e864a3c 100644 --- a/spock-spring/boot2-test/boot2-test.gradle +++ b/spock-spring/boot2-test/boot2-test.gradle @@ -1,3 +1,5 @@ +import org.springframework.boot.gradle.plugin.SpringBootPlugin + /* * Copyright 2018 the original author or authors. * @@ -15,8 +17,18 @@ */ plugins { - id "io.spring.dependency-management" version "1.0.5.RELEASE" - id 'org.springframework.boot' version "2.5.3" + // Normally, the Spring Boot 2 Gradle Plugin would not be compatible with Gradle 9+ + // To get around this issue, we use the dependency-management plugin in isolation + // as described here: https://docs.spring.io/spring-boot/docs/2.7.7/gradle-plugin/reference/htmlsingle/#managing-dependencies.dependency-management-plugin.using-in-isolation + // This way, we get proper test execution and realistic version resolution on Gradle 9 + id 'org.springframework.boot' version "2.7.18" apply false + id "io.spring.dependency-management" version "1.1.7" +} + +dependencyManagement { + imports { + mavenBom SpringBootPlugin.BOM_COORDINATES + } } // Spring dependency management downgrades the jupiter version to 5.7.2 otherwise diff --git a/spock-spring/boot3-test/boot3-test.gradle b/spock-spring/boot3-test/boot3-test.gradle index 00e78c11e6..cb8f47b8b1 100644 --- a/spock-spring/boot3-test/boot3-test.gradle +++ b/spock-spring/boot3-test/boot3-test.gradle @@ -14,8 +14,8 @@ * limitations under the License. */ plugins { - id 'org.springframework.boot' version '3.0.0' - id 'io.spring.dependency-management' version '1.1.0' + id 'org.springframework.boot' version '3.5.5' + id 'io.spring.dependency-management' version '1.1.7' id 'groovy' }