diff --git a/build.gradle b/build.gradle index 88cdc51360..5775bdf652 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,6 @@ plugins { id 'io.spring.gradle-enterprise-conventions' version '0.0.2' id 'io.spring.nohttp' version '0.0.4.RELEASE' id 'de.undercouch.download' version '4.0.0' - id 'com.gradle.build-scan' version '3.2' id "io.freefair.aspectj" version '4.1.1' apply false id "com.github.ben-manes.versions" version '0.24.0' } diff --git a/gradle/spring-module.gradle b/gradle/spring-module.gradle index 048735af1c..3291de9f33 100644 --- a/gradle/spring-module.gradle +++ b/gradle/spring-module.gradle @@ -63,9 +63,5 @@ publishing { } // Disable publication of test fixture artifacts. -// -// Once we upgrade to Gradle 6.x, we will need to delete the following line ... -components.java.variants.removeAll { it.outgoingConfiguration.name.startsWith("testFixtures") } -// ... and uncomment the following two lines. -// components.java.withVariantsFromConfiguration(configurations.testFixturesApiElements) { skip() } -// components.java.withVariantsFromConfiguration(configurations.testFixturesRuntimeElements) { skip() } +components.java.withVariantsFromConfiguration(configurations.testFixturesApiElements) { skip() } +components.java.withVariantsFromConfiguration(configurations.testFixturesRuntimeElements) { skip() } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 5c2d1cf016..f3d88b1c2f 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 5028f28f8e..b7c8c5dbf5 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 83f2acfdc3..2fe81a7d95 100755 --- a/gradlew +++ b/gradlew @@ -154,19 +154,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then else eval `echo args$i`="\"$arg\"" fi - i=$((i+1)) + i=`expr $i + 1` done case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi @@ -175,14 +175,9 @@ save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } -APP_ARGS=$(save "$@") +APP_ARGS=`save "$@"` # Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - exec "$JAVACMD" "$@" diff --git a/settings.gradle b/settings.gradle index ba295ee37f..1eb14494dd 100644 --- a/settings.gradle +++ b/settings.gradle @@ -4,6 +4,11 @@ pluginManagement { maven { url 'https://repo.spring.io/plugins-release' } } } + +plugins { + id("com.gradle.enterprise").version("3.1.1") +} + apply from: "$rootDir/gradle/build-cache-settings.gradle" include "spring-aop" diff --git a/spring-beans/spring-beans.gradle b/spring-beans/spring-beans.gradle index 0e96708115..556c69a100 100644 --- a/spring-beans/spring-beans.gradle +++ b/spring-beans/spring-beans.gradle @@ -29,7 +29,11 @@ compileGroovy { // This module also builds Kotlin code and the compileKotlin task naturally depends on // compileJava. We need to redefine dependencies to break task cycles. -def deps = compileGroovy.taskDependencies.immutableValues + compileGroovy.taskDependencies.mutableValues -compileGroovy.dependsOn = deps - "compileJava" -compileKotlin.dependsOn(compileGroovy) -compileKotlin.classpath += files(compileGroovy.destinationDir) +tasks.named('compileGroovy') { + // Groovy only needs the declared dependencies (and not the result of Java compilation) + classpath = sourceSets.main.compileClasspath +} +tasks.named('compileKotlin') { + // Kotlin also depends on the result of Groovy compilation + classpath += files(sourceSets.main.groovy.classesDirectory) +} diff --git a/spring-core/spring-core.gradle b/spring-core/spring-core.gradle index d88536a3fe..2eb4d44348 100644 --- a/spring-core/spring-core.gradle +++ b/spring-core/spring-core.gradle @@ -92,3 +92,9 @@ jar { from configurations.coroutines } + +test { + // make sure the classes dir is used on the test classpath (required by ResourceTests) + // When test fixtures are involved, the JAR is used by default + classpath = sourceSets.main.output.classesDirs + classpath - files(jar.archiveFile) +} \ No newline at end of file