diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc index 4a29dbe0a8..0c45a612b7 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc @@ -168,7 +168,7 @@ Advanced configuration options and examples are available in the == Spring Boot Gradle Plugin The Spring Boot Gradle Plugin provides Spring Boot support in Gradle, letting you package executable jar or war archives, run Spring Boot applications, and use the dependency -management provided by `spring-boot-dependencies`. It requires Gradle 4.0 or later. Please +management provided by `spring-boot-dependencies`. It requires Gradle 4.4 or later. Please refer to the plugin's documentation to learn more: * Reference ({spring-boot-gradle-plugin}/reference/html[HTML] and diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/getting-started.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/getting-started.adoc index ff6b50b31b..2e2ad1ca70 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/getting-started.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/getting-started.adoc @@ -50,7 +50,7 @@ Explicit build support is provided for the following build tools: |3.2+ |Gradle -|4.x +|4.4+ |=== @@ -199,8 +199,8 @@ scope. [[getting-started-gradle-installation]] ==== Gradle Installation -Spring Boot is compatible with Gradle 4. If you do not already have Gradle installed, you -can follow the instructions at https://gradle.org. +Spring Boot is compatible with Gradle 4.4 and later. If you do not already have Gradle +installed, you can follow the instructions at https://gradle.org. Spring Boot dependencies can be declared by using the `org.springframework.boot` `group`. Typically, your project declares dependencies to one or more diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/gradle/wrapper/gradle-wrapper.jar b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/gradle/wrapper/gradle-wrapper.jar index 372a96843c..01b8bf6b1f 100644 Binary files a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/gradle/wrapper/gradle-wrapper.jar and b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/gradle/wrapper/gradle-wrapper.jar differ diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/gradle/wrapper/gradle-wrapper.properties b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/gradle/wrapper/gradle-wrapper.properties index cbf13171d5..2c2bbe5f9a 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/gradle/wrapper/gradle-wrapper.properties +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Thu Jul 27 14:32:22 BST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/gradlew b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/gradlew index 4453ccea33..cccdd3d517 100755 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/gradlew +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/gradlew @@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS="" # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" -warn ( ) { +warn () { echo "$*" } -die ( ) { +die () { echo echo "$*" echo @@ -155,7 +155,7 @@ if $cygwin ; then fi # Escape application args -save ( ) { +save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/index.adoc b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/index.adoc index 82fb802dc5..d16ec8fb8c 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/index.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/index.adoc @@ -37,7 +37,7 @@ Andy Wilkinson The Spring Boot Gradle Plugin provides Spring Boot support in https://gradle.org[Gradle], allowing you to package executable jar or war archives, run Spring Boot applications, and use the dependency management provided by `spring-boot-dependencies`. Spring Boot's -Gradle plugin requires Gradle 4.0 or later. +Gradle plugin requires Gradle 4.4 or later. In addition to this user guide, {api-documentation}[API documentation] is also available. diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/SpringBootPlugin.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/SpringBootPlugin.java index f278410a57..c9b2eca0be 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/SpringBootPlugin.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/SpringBootPlugin.java @@ -84,8 +84,8 @@ public class SpringBootPlugin implements Plugin { } private void verifyGradleVersion() { - if (GradleVersion.current().compareTo(GradleVersion.version("4.0")) < 0) { - throw new GradleException("Spring Boot plugin requires Gradle 4.0 or later." + if (GradleVersion.current().compareTo(GradleVersion.version("4.4")) < 0) { + throw new GradleException("Spring Boot plugin requires Gradle 4.4 or later." + " The current version is " + GradleVersion.current()); } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootZipCopyAction.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootZipCopyAction.java index 47dd1b3eac..b7b6e3a844 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootZipCopyAction.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootZipCopyAction.java @@ -53,7 +53,7 @@ import org.springframework.boot.loader.tools.FileUtils; */ class BootZipCopyAction implements CopyAction { - private static final long CONSTANT_TIME_FOR_ZIP_ENTRIES = new GregorianCalendar(1980, + static final long CONSTANT_TIME_FOR_ZIP_ENTRIES = new GregorianCalendar(1980, Calendar.FEBRUARY, 1, 0, 0, 0).getTimeInMillis(); private final File output; diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/junit/GradleCompatibilitySuite.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/junit/GradleCompatibilitySuite.java index c25211041d..5e8b05199f 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/junit/GradleCompatibilitySuite.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/junit/GradleCompatibilitySuite.java @@ -38,8 +38,8 @@ import org.springframework.boot.gradle.testkit.GradleBuild; */ public final class GradleCompatibilitySuite extends Suite { - private static final List GRADLE_VERSIONS = Arrays.asList("default", "4.1", - "4.2", "4.3", "4.4.1", "4.5.1", "4.6", "4.7", "4.8.1", "4.9", "4.10"); + private static final List GRADLE_VERSIONS = Arrays.asList("default", "4.5.1", + "4.6", "4.7", "4.8.1", "4.9", "4.10"); public GradleCompatibilitySuite(Class clazz) throws InitializationError { super(clazz, createRunners(clazz)); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/SpringBootPluginIntegrationTests.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/SpringBootPluginIntegrationTests.java index 0dd6d0ff16..33ae6092d8 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/SpringBootPluginIntegrationTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/SpringBootPluginIntegrationTests.java @@ -39,19 +39,19 @@ public class SpringBootPluginIntegrationTests { @Test public void failFastWithVersionOfGradleLowerThanRequired() { - BuildResult result = this.gradleBuild.gradleVersion("3.5.1").buildAndFail(); - assertThat(result.getOutput()).contains("Spring Boot plugin requires Gradle 4.0" - + " or later. The current version is Gradle 3.5.1"); + BuildResult result = this.gradleBuild.gradleVersion("4.3").buildAndFail(); + assertThat(result.getOutput()).contains("Spring Boot plugin requires Gradle 4.4" + + " or later. The current version is Gradle 4.3"); } @Test public void succeedWithVersionOfGradleHigherThanRequired() { - this.gradleBuild.gradleVersion("4.0.1").build(); + this.gradleBuild.gradleVersion("4.4.1").build(); } @Test public void succeedWithVersionOfGradleMatchingWhatIsRequired() { - this.gradleBuild.gradleVersion("4.0").build(); + this.gradleBuild.gradleVersion("4.4").build(); } @Test diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java index f3e6c7a6d8..7b4682a3e6 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java @@ -37,7 +37,6 @@ import org.gradle.api.Project; import org.gradle.api.tasks.bundling.AbstractArchiveTask; import org.gradle.api.tasks.bundling.Jar; import org.gradle.testfixtures.ProjectBuilder; -import org.gradle.util.GUtil; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -281,7 +280,7 @@ public abstract class AbstractBootArchiveTests { while (entries.hasMoreElements()) { JarEntry entry = entries.nextElement(); assertThat(entry.getTime()) - .isEqualTo(GUtil.CONSTANT_TIME_FOR_ZIP_ENTRIES); + .isEqualTo(BootZipCopyAction.CONSTANT_TIME_FOR_ZIP_ENTRIES); } } }