File tree 8 files changed +43
-23
lines changed
spring-boot-docs/src/main/asciidoc
spring-boot-integration-tests/spring-boot-gradle-tests/src/test
java/org/springframework/boot/gradle
resources/spring-loaded-jvm-args
spring-boot-tools/spring-boot-gradle-plugin
src/main/java/org/springframework/boot/gradle/plugin
8 files changed +43
-23
lines changed Original file line number Diff line number Diff line change 74
74
<elasticsearch .version>2.4.0</elasticsearch .version>
75
75
<gemfire .version>8.2.0</gemfire .version>
76
76
<glassfish-el .version>3.0.0</glassfish-el .version>
77
- <gradle .version>1.12 </gradle .version>
77
+ <gradle .version>2.9 </gradle .version>
78
78
<groovy .version>2.4.7</groovy .version>
79
79
<gson .version>2.7</gson .version>
80
80
<h2 .version>1.4.193</h2 .version>
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ diverge from the defaults.
39
39
By default, Spring Boot {spring-boot-version} requires http://www.java.com[Java 7] and
40
40
Spring Framework {spring-version} or above. You can use Spring Boot with Java 6 with some
41
41
additional configuration. See <<howto.adoc#howto-use-java-6>> for more details. Explicit
42
- build support is provided for Maven (3.2+) and Gradle (1.12 or 2.x ). Support for Gradle
43
- 2.8 and earlier is deprecated. Gradle 3 is not supported.
42
+ build support is provided for Maven (3.2+) and Gradle 2 (2.9 or later ). Gradle 3 is not
43
+ supported.
44
44
45
45
TIP: Although you can use Spring Boot with Java 6 or 7, we generally recommend Java 8 if
46
46
at all possible.
@@ -205,9 +205,9 @@ scope.
205
205
206
206
[[getting-started-gradle-installation]]
207
207
==== Gradle installation
208
- Spring Boot is compatible with Gradle 1.12 or 2.x but support for 2.8 and earlier is
209
- deprecated. Gradle 2.14.1 is recommended. Gradle 3 is not supported. If you don't already
210
- have Gradle installed you can follow the instructions at http://www.gradle.org/.
208
+ Spring Boot is compatible with Gradle 2 (2.9 or later). Gradle 2.14.1 is recommended and
209
+ Gradle 3 is not supported. If you don't already have Gradle installed you can follow the
210
+ instructions at http://www.gradle.org/.
211
211
212
212
Spring Boot dependencies can be declared using the `org.springframework.boot` `group`.
213
213
Typically your project will declare dependencies to one or more
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public static void createProject() throws IOException {
50
50
public void resourcesDirectlyFromSource () {
51
51
project .newBuild ().forTasks ("clean" , "bootRun" )
52
52
.withArguments ("-PbootVersion=" + BOOT_VERSION , "-PaddResources=true" )
53
- .run ();
53
+ .setStandardOutput ( System . out ). run ();
54
54
55
55
assertThat (this .output .toString ()).contains ("src/main/resources/test.txt" );
56
56
}
@@ -59,7 +59,7 @@ public void resourcesDirectlyFromSource() {
59
59
public void resourcesFromBuildOutput () {
60
60
project .newBuild ().forTasks ("clean" , "bootRun" )
61
61
.withArguments ("-PbootVersion=" + BOOT_VERSION , "-PaddResources=false" )
62
- .run ();
62
+ .setStandardOutput ( System . out ). run ();
63
63
assertThat (this .output .toString ()).contains ("build/resources/main/test.txt" );
64
64
}
65
65
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ public class ProjectCreator {
34
34
private String gradleVersion ;
35
35
36
36
public ProjectCreator () {
37
- this ("1.12 " );
37
+ this ("2.9 " );
38
38
}
39
39
40
40
public ProjectCreator (String gradleVersion ) {
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ buildscript {
9
9
}
10
10
}
11
11
12
+ apply plugin : ' application'
12
13
apply plugin : ' java'
13
14
apply plugin : ' org.springframework.boot'
14
15
Original file line number Diff line number Diff line change 187
187
<artifactId >aether-util</artifactId >
188
188
<version >${aether.version} </version >
189
189
</dependency >
190
+ <dependency >
191
+ <groupId >org.gradle</groupId >
192
+ <artifactId >gradle-base-services</artifactId >
193
+ <version >${gradle.version} </version >
194
+ </dependency >
195
+ <dependency >
196
+ <groupId >org.gradle</groupId >
197
+ <artifactId >gradle-base-services-groovy</artifactId >
198
+ <version >${gradle.version} </version >
199
+ </dependency >
190
200
<dependency >
191
201
<groupId >org.gradle</groupId >
192
202
<artifactId >gradle-core</artifactId >
193
203
<version >${gradle.version} </version >
194
204
</dependency >
195
205
<dependency >
196
206
<groupId >org.gradle</groupId >
197
- <artifactId >gradle-base-services </artifactId >
207
+ <artifactId >gradle-language-java </artifactId >
198
208
<version >${gradle.version} </version >
199
209
</dependency >
200
210
<dependency >
201
211
<groupId >org.gradle</groupId >
202
- <artifactId >gradle-base-services-groovy</artifactId >
212
+ <artifactId >gradle-language-jvm</artifactId >
213
+ <version >${gradle.version} </version >
214
+ </dependency >
215
+ <dependency >
216
+ <groupId >org.gradle</groupId >
217
+ <artifactId >gradle-platform-jvm</artifactId >
203
218
<version >${gradle.version} </version >
204
219
</dependency >
205
220
<dependency >
Original file line number Diff line number Diff line change 33
33
<artifactId >groovy</artifactId >
34
34
<scope >provided</scope >
35
35
</dependency >
36
+ <dependency >
37
+ <groupId >org.gradle</groupId >
38
+ <artifactId >gradle-base-services</artifactId >
39
+ <scope >provided</scope >
40
+ </dependency >
36
41
<dependency >
37
42
<groupId >org.gradle</groupId >
38
43
<artifactId >gradle-core</artifactId >
39
44
<scope >provided</scope >
40
45
</dependency >
41
46
<dependency >
42
47
<groupId >org.gradle</groupId >
43
- <artifactId >gradle-base-services</artifactId >
48
+ <artifactId >gradle-language-java</artifactId >
49
+ <scope >provided</scope >
50
+ </dependency >
51
+ <dependency >
52
+ <groupId >org.gradle</groupId >
53
+ <artifactId >gradle-language-jvm</artifactId >
54
+ <scope >provided</scope >
55
+ </dependency >
56
+ <dependency >
57
+ <groupId >org.gradle</groupId >
58
+ <artifactId >gradle-platform-jvm</artifactId >
44
59
<scope >provided</scope >
45
60
</dependency >
46
61
<dependency >
Original file line number Diff line number Diff line change 22
22
import org .gradle .api .Task ;
23
23
import org .gradle .api .plugins .JavaPlugin ;
24
24
import org .gradle .api .tasks .compile .JavaCompile ;
25
- import org .gradle .util .GradleVersion ;
26
- import org .slf4j .Logger ;
27
- import org .slf4j .LoggerFactory ;
28
25
29
26
import org .springframework .boot .gradle .SpringBootPluginExtension ;
30
27
import org .springframework .boot .gradle .agent .AgentPluginFeatures ;
41
38
*/
42
39
public class SpringBootPlugin implements Plugin <Project > {
43
40
44
- private static final Logger logger = LoggerFactory .getLogger (SpringBootPlugin .class );
45
-
46
41
@ Override
47
42
public void apply (Project project ) {
48
- if (GradleVersion .current ().compareTo (GradleVersion .version ("2.9" )) < 0 ) {
49
- logger .warn ("Spring Boot plugin's support for Gradle "
50
- + GradleVersion .current ().getVersion ()
51
- + " is deprecated. Please upgrade to Gradle 2.9 or later." );
52
- }
53
43
project .getExtensions ().create ("springBoot" , SpringBootPluginExtension .class ,
54
44
project );
55
45
project .getPlugins ().apply (JavaPlugin .class );
@@ -67,7 +57,6 @@ public void execute(final JavaCompile compile) {
67
57
compile .doFirst (new Action <Task >() {
68
58
69
59
@ Override
70
- @ SuppressWarnings ("deprecation" )
71
60
public void execute (Task t ) {
72
61
if (compile .getOptions ().getEncoding () == null ) {
73
62
compile .getOptions ().setEncoding ("UTF-8" );
You can’t perform that action at this time.
0 commit comments