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 fb972479a1..c9bcf6ca80 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 @@ -169,7 +169,8 @@ 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.4 or later. Please +management provided by `spring-boot-dependencies`. It requires Gradle 5.x (4.10 is also +supported but this support is deprecated and will be removed in a future release). 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 6d35ac7c36..33fc8ed912 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 @@ -52,7 +52,7 @@ Explicit build support is provided for the following build tools: |3.3+ |Gradle -|4.4+ +|5.x (4.10 is also supported but in a deprecated form) |=== @@ -201,8 +201,9 @@ scope. [[getting-started-gradle-installation]] ==== Gradle Installation -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 is compatible with 5.x. 4.10 is also supported but this support is deprecated +and will be removed in a future release. 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 01b8bf6b1f..1353677005 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 2c2bbe5f9a..290541c738 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,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -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/src/main/asciidoc/getting-started.adoc b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/getting-started.adoc index 3ef9c146fd..85e6365efa 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/getting-started.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/getting-started.adoc @@ -19,18 +19,10 @@ include::../gradle/getting-started/apply-plugin-release.gradle.kts[] ---- endif::[] ifeval::["{version-type}" == "MILESTONE"] -The plugin is published to the Spring milestones repository. For Gradle versions less -than 4.10, this means that you must apply the plugin imperatively: - -[source,groovy,indent=0,subs="verbatim,attributes"] ----- -include::../gradle/getting-started/apply-plugin-milestone.gradle[] ----- - -For Gradle 4.10 and above, Gradle can be configured to use the milestones repository -and it can be applied using the `plugins` block. To configure Gradle to use the milestones -repository, add the following to your `settings.gradle` (Groovy) or `settings.gradle.kts` -(Kotlin): +The plugin is published to the Spring milestones repository. Gradle can be configured to +use the milestones repository and the plugin can then be applied using the `plugins` +block. To configure Gradle to use the milestones repository, add the following to your +`settings.gradle` (Groovy) or `settings.gradle.kts` (Kotlin): [source,groovy,indent=0,subs="verbatim,attributes",role="primary"] .Groovy @@ -59,18 +51,10 @@ include::../gradle/getting-started/apply-plugin-release.gradle.kts[] ---- endif::[] ifeval::["{version-type}" == "SNAPSHOT"] -The plugin is published to the Spring snapshots repository. For Gradle versions less -than 4.10, this means that you must apply the plugin imperatively: - -[source,groovy,indent=0,subs="verbatim,attributes"] ----- -include::../gradle/getting-started/apply-plugin-milestone.gradle[] ----- - -For Gradle 4.10 and above, Gradle can be configured to use the snapshots repository -and it can be applied using the `plugins` block. To configure Gradle to use the snapshots -repository, add the following to your `settings.gradle` (Groovy) or `settings.gradle.kts` -(Kotlin): +The plugin is published to the Spring snapshots repository. Gradle can be configured to +use the snapshots repository and the plugin can then be applied using the `plugins` +block. To configure Gradle to use the snapshots repository, add the following to your +`settings.gradle` (Groovy) or `settings.gradle.kts` (Kotlin): [source,groovy,indent=0,subs="verbatim,attributes",role="primary"] .Groovy 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 f8da6b914f..91969d024f 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 @@ -39,8 +39,8 @@ 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.4 or later. If you choose to use the newer Kotlin DSL, -it requires Gradle 4.10 or later. +Gradle plugin requires Gradle 5.x (4.10 is also supported but this support is deprecated +and will be removed in a future release). 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/gradle/getting-started/apply-plugin-milestone.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/getting-started/apply-plugin-milestone.gradle deleted file mode 100644 index 0302ec6f4d..0000000000 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/getting-started/apply-plugin-milestone.gradle +++ /dev/null @@ -1,11 +0,0 @@ -buildscript { - repositories { - maven { url 'https://repo.spring.io/libs-milestone' } - } - - dependencies { - classpath 'org.springframework.boot:spring-boot-gradle-plugin:{version}' - } -} - -apply plugin: 'org.springframework.boot' 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 3a8af9dea7..f9b63730fd 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 @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -119,7 +119,6 @@ class BootZipCopyAction implements CopyAction { return () -> true; } - @SuppressWarnings("unchecked") private Spec createExclusionSpec( Spec loaderEntries) { return Specs.union(loaderEntries, this.exclusions); 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 3f9362066e..82916d712a 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,9 +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.5.1", - "4.6", "4.7", "4.8.1", "4.9", "4.10.3", "5.0", "5.1.1", "5.2.1", "5.3.1", - "5.4.1"); + private static final List GRADLE_VERSIONS = Arrays.asList("default", "5.0", + "5.1.1", "5.2.1", "5.3.1", "5.4.1"); public GradleCompatibilitySuite(Class clazz) throws InitializationError { super(clazz, createRunners(clazz));