diff --git a/spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc b/spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc index ecba7d1a03..f15123d437 100644 --- a/spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc +++ b/spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc @@ -166,7 +166,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, allowing you to package executable jar or war archives, run Spring Boot applications and use the -dependency management provided by `spring-boot-dependencies`. It requires Gradle 3.4 or +dependency management provided by `spring-boot-dependencies`. It requires Gradle 4.0 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-docs/src/main/asciidoc/getting-started.adoc b/spring-boot-docs/src/main/asciidoc/getting-started.adoc index fc15fd01fb..8823d96e98 100644 --- a/spring-boot-docs/src/main/asciidoc/getting-started.adoc +++ b/spring-boot-docs/src/main/asciidoc/getting-started.adoc @@ -38,7 +38,7 @@ diverge from the defaults. == System Requirements Spring Boot {spring-boot-version} requires http://www.java.com[Java 8] and Spring Framework {spring-version} or above. Explicit build support is provided for Maven -(3.2+), and Gradle 3 (3.4 or later). +(3.2+), and Gradle 4. [[getting-started-system-requirements-servlet-containers]] @@ -185,8 +185,8 @@ scope. [[getting-started-gradle-installation]] ==== Gradle installation -Spring Boot is compatible with Gradle 3 (3.4 or later). If you don't already have Gradle -installed you can follow the instructions at http://www.gradle.org/. +Spring Boot is compatible with Gradle 4. If you don't already have Gradle installed you +can follow the instructions at http://www.gradle.org/. Spring Boot dependencies can be declared using the `org.springframework.boot` `group`. Typically your project will declare dependencies to one or more diff --git a/spring-boot-docs/src/main/asciidoc/index.adoc b/spring-boot-docs/src/main/asciidoc/index.adoc index fc551a4f1b..d5606decfd 100644 --- a/spring-boot-docs/src/main/asciidoc/index.adoc +++ b/spring-boot-docs/src/main/asciidoc/index.adoc @@ -51,7 +51,7 @@ Phillip Webb; Dave Syer; Josh Long; Stéphane Nicoll; Rob Winch; Andy Wilkinson; :propdeps-plugin: https://github.com/spring-projects/gradle-plugins/tree/master/propdeps-plugin :ant-manual: http://ant.apache.org/manual :code-examples: ../java/org/springframework/boot -:gradle-user-guide: https://docs.gradle.org/3.4.1/userguide +:gradle-user-guide: https://docs.gradle.org/4.0.2/userguide :hibernate-documentation: http://docs.jboss.org/hibernate/orm/5.2/userguide/html_single/Hibernate_User_Guide.html :jetty-documentation: https://www.eclipse.org/jetty/documentation/9.4.x :tomcat-documentation: https://tomcat.apache.org/tomcat-8.5-doc diff --git a/spring-boot-tools/spring-boot-gradle-plugin/build.gradle b/spring-boot-tools/spring-boot-gradle-plugin/build.gradle index 23d5ed3dce..21413e3f9f 100644 --- a/spring-boot-tools/spring-boot-gradle-plugin/build.gradle +++ b/spring-boot-tools/spring-boot-gradle-plugin/build.gradle @@ -1,7 +1,6 @@ plugins { id 'java' id 'eclipse' - id 'org.sonarqube' version '2.2.1' } repositories { diff --git a/spring-boot-tools/spring-boot-gradle-plugin/gradle/wrapper/gradle-wrapper.jar b/spring-boot-tools/spring-boot-gradle-plugin/gradle/wrapper/gradle-wrapper.jar index 52b668fd0f..372a96843c 100644 Binary files a/spring-boot-tools/spring-boot-gradle-plugin/gradle/wrapper/gradle-wrapper.jar and b/spring-boot-tools/spring-boot-gradle-plugin/gradle/wrapper/gradle-wrapper.jar differ diff --git a/spring-boot-tools/spring-boot-gradle-plugin/gradle/wrapper/gradle-wrapper.properties b/spring-boot-tools/spring-boot-gradle-plugin/gradle/wrapper/gradle-wrapper.properties index d5a35ad90a..cbf13171d5 100644 --- a/spring-boot-tools/spring-boot-gradle-plugin/gradle/wrapper/gradle-wrapper.properties +++ b/spring-boot-tools/spring-boot-gradle-plugin/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Mar 16 20:08:41 GMT 2017 +#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-3.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.0.2-bin.zip diff --git a/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/index.adoc b/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/index.adoc index d2d12ac49c..14d0e5fb35 100644 --- a/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/index.adoc +++ b/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/index.adoc @@ -36,7 +36,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 3.4 or later. +Gradle plugin requires Gradle 4.0 or later. In addition to this user guide, {api-documentation}[API documentation] is also available. diff --git a/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/SpringBootPlugin.java b/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/SpringBootPlugin.java index 1d382b964e..bb85d9664a 100644 --- a/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/SpringBootPlugin.java +++ b/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/SpringBootPlugin.java @@ -68,8 +68,8 @@ public class SpringBootPlugin implements Plugin { } private void verifyGradleVersion() { - if (GradleVersion.current().compareTo(GradleVersion.version("3.4")) < 0) { - throw new GradleException("Spring Boot plugin requires Gradle 3.4 or later." + if (GradleVersion.current().compareTo(GradleVersion.version("4.0")) < 0) { + throw new GradleException("Spring Boot plugin requires Gradle 4.0 or later." + " The current version is " + GradleVersion.current()); } } diff --git a/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/junit/GradleCompatibilitySuite.java b/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/junit/GradleCompatibilitySuite.java index 8b47945046..79e05f2d8d 100644 --- a/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/junit/GradleCompatibilitySuite.java +++ b/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", "3.4.1", - "3.5", "3.5.1", "4.0", "4.0.1", "4.1-rc-1"); + private static final List GRADLE_VERSIONS = Arrays.asList("default", + "4.1-rc-1"); public GradleCompatibilitySuite(Class clazz) throws InitializationError { super(clazz, createRunners(clazz)); diff --git a/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/SpringBootPluginIntegrationTests.java b/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/SpringBootPluginIntegrationTests.java index 0fff853803..26b6cab904 100644 --- a/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/SpringBootPluginIntegrationTests.java +++ b/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/SpringBootPluginIntegrationTests.java @@ -36,19 +36,19 @@ public class SpringBootPluginIntegrationTests { @Test public void failFastWithVersionOfGradleLowerThanRequired() { - BuildResult result = this.gradleBuild.gradleVersion("3.3").buildAndFail(); - assertThat(result.getOutput()).contains("Spring Boot plugin requires Gradle 3.4" - + " or later. The current version is Gradle 3.3"); + 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"); } @Test public void succeedWithVersionOfGradleHigherThanRequired() { - this.gradleBuild.gradleVersion("3.5").build(); + this.gradleBuild.gradleVersion("4.0.1").build(); } @Test public void succeedWithVersionOfGradleMatchingWhatIsRequired() { - this.gradleBuild.gradleVersion("3.4").build(); + this.gradleBuild.gradleVersion("4.0").build(); } } diff --git a/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/run/BootRunIntegrationTests.java b/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/run/BootRunIntegrationTests.java index 617ac378a7..d84456b949 100644 --- a/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/run/BootRunIntegrationTests.java +++ b/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/run/BootRunIntegrationTests.java @@ -51,7 +51,7 @@ public class BootRunIntegrationTests { new File(this.gradleBuild.getProjectDir(), "src/main/resources").mkdirs(); BuildResult result = this.gradleBuild.build("bootRun"); assertThat(result.task(":bootRun").getOutcome()).isEqualTo(TaskOutcome.SUCCESS); - assertThat(result.getOutput()).contains("1. " + urlOf(mainJavaOutput())); + assertThat(result.getOutput()).contains("1. " + urlOf("build/classes/java/main")); assertThat(result.getOutput()).contains("2. " + urlOf("build/resources/main")); assertThat(result.getOutput()).doesNotContain(urlOf("src/main/resources")); } @@ -65,7 +65,7 @@ public class BootRunIntegrationTests { BuildResult result = this.gradleBuild.build("bootRun"); assertThat(result.task(":bootRun").getOutcome()).isEqualTo(TaskOutcome.SUCCESS); assertThat(result.getOutput()).contains("1. " + urlOf("src/main/resources")); - assertThat(result.getOutput()).contains("2. " + urlOf(mainJavaOutput())); + assertThat(result.getOutput()).contains("2. " + urlOf("build/classes/java/main")); assertThat(result.getOutput()).doesNotContain(urlOf("build/resources/main")); } @@ -87,13 +87,6 @@ public class BootRunIntegrationTests { .contains("JVM arguments = [-Dcom.foo=bar, -Dcom.bar=baz]"); } - private String mainJavaOutput() { - String gradleVersion = this.gradleBuild.getGradleVersion(); - return "build/classes/" - + (gradleVersion != null && gradleVersion.startsWith("4.") ? "java/" : "") - + "main"; - } - private String urlOf(String path) throws IOException { return new File(this.gradleBuild.getProjectDir().getCanonicalFile(), path).toURI() .toURL().toString();