Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
c2459fce
Commit
c2459fce
authored
Jul 27, 2017
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Raise the minimum version of Gradle to 4.0
Closes gh-9516
parent
32a40673
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
19 additions
and
27 deletions
+19
-27
build-tool-plugins.adoc
spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc
+1
-1
getting-started.adoc
spring-boot-docs/src/main/asciidoc/getting-started.adoc
+3
-3
index.adoc
spring-boot-docs/src/main/asciidoc/index.adoc
+1
-1
build.gradle
spring-boot-tools/spring-boot-gradle-plugin/build.gradle
+0
-1
gradle-wrapper.jar
...ring-boot-gradle-plugin/gradle/wrapper/gradle-wrapper.jar
+0
-0
gradle-wrapper.properties
...ot-gradle-plugin/gradle/wrapper/gradle-wrapper.properties
+2
-2
index.adoc
...ls/spring-boot-gradle-plugin/src/main/asciidoc/index.adoc
+1
-1
SpringBootPlugin.java
.../springframework/boot/gradle/plugin/SpringBootPlugin.java
+2
-2
GradleCompatibilitySuite.java
...framework/boot/gradle/junit/GradleCompatibilitySuite.java
+2
-2
SpringBootPluginIntegrationTests.java
.../boot/gradle/plugin/SpringBootPluginIntegrationTests.java
+5
-5
BootRunIntegrationTests.java
...mework/boot/gradle/tasks/run/BootRunIntegrationTests.java
+2
-9
No files found.
spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc
View file @
c2459fce
...
...
@@ -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
...
...
spring-boot-docs/src/main/asciidoc/getting-started.adoc
View file @
c2459fce
...
...
@@ -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
...
...
spring-boot-docs/src/main/asciidoc/index.adoc
View file @
c2459fce
...
...
@@ -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
...
...
spring-boot-tools/spring-boot-gradle-plugin/build.gradle
View file @
c2459fce
plugins
{
id
'java'
id
'eclipse'
id
'org.sonarqube'
version
'2.2.1'
}
repositories
{
...
...
spring-boot-tools/spring-boot-gradle-plugin/gradle/wrapper/gradle-wrapper.jar
View file @
c2459fce
No preview for this file type
spring-boot-tools/spring-boot-gradle-plugin/gradle/wrapper/gradle-wrapper.properties
View file @
c2459fce
#Thu
Mar 16 20:08:41 GM
T 2017
#Thu
Jul 27 14:32:22 BS
T 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
spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/index.adoc
View file @
c2459fce
...
...
@@ -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.
...
...
spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/SpringBootPlugin.java
View file @
c2459fce
...
...
@@ -68,8 +68,8 @@ public class SpringBootPlugin implements Plugin<Project> {
}
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
());
}
}
...
...
spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/junit/GradleCompatibilitySuite.java
View file @
c2459fce
...
...
@@ -38,8 +38,8 @@ import org.springframework.boot.gradle.testkit.GradleBuild;
*/
public
final
class
GradleCompatibilitySuite
extends
Suite
{
private
static
final
List
<
String
>
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
<
String
>
GRADLE_VERSIONS
=
Arrays
.
asList
(
"default"
,
"4.1-rc-1"
);
public
GradleCompatibilitySuite
(
Class
<?>
clazz
)
throws
InitializationError
{
super
(
clazz
,
createRunners
(
clazz
));
...
...
spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/plugin/SpringBootPluginIntegrationTests.java
View file @
c2459fce
...
...
@@ -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
();
}
}
spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/run/BootRunIntegrationTests.java
View file @
c2459fce
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment