Upgrade to Gradle 3.4.1

This commit upgrades the wrapper version for Gradle 3 to the latest
version and enables it as of Spring Boot 1.5 (previously, Gradle 3 was
only applied as of Spring Boot 2).

Closes gh-380
This commit is contained in:
Stephane Nicoll
2017-03-09 11:33:45 +01:00
parent 4186db4191
commit 2b0e967e32
4 changed files with 6 additions and 6 deletions

View File

@@ -71,7 +71,7 @@ public class ProjectGenerator {
private static final Version VERSION_1_4_2_M1 = Version.parse("1.4.2.M1"); private static final Version VERSION_1_4_2_M1 = Version.parse("1.4.2.M1");
private static final Version VERSION_2_0_0_M1 = Version.parse("2.0.0.M1"); private static final Version VERSION_1_5_0_M1 = Version.parse("1.5.0.M1");
@Autowired @Autowired
private ApplicationEventPublisher eventPublisher; private ApplicationEventPublisher eventPublisher;
@@ -502,7 +502,7 @@ public class ProjectGenerator {
} }
private static boolean isGradle3Available(Version bootVersion) { private static boolean isGradle3Available(Version bootVersion) {
return VERSION_2_0_0_M1.compareTo(bootVersion) <= 0; return VERSION_1_5_0_M1.compareTo(bootVersion) <= 0;
} }
private byte[] doGenerateMavenPom(Map<String, Object> model) { private byte[] doGenerateMavenPom(Map<String, Object> model) {

View File

@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.2.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-bin.zip

View File

@@ -297,11 +297,11 @@ public class ProjectGeneratorTests extends AbstractProjectGeneratorTests {
} }
@Test @Test
public void springBoot2UseGradle3() { public void springBoot15UseGradle3() {
ProjectRequest request = createProjectRequest("web"); ProjectRequest request = createProjectRequest("web");
request.setType("gradle-project"); request.setType("gradle-project");
request.setBootVersion("2.0.0.BUILD-SNAPSHOT"); request.setBootVersion("1.5.0.RELEASE");
generateProject(request).isGradleProject("3.2.1"); generateProject(request).isGradleProject("3.4.1");
} }
@Test @Test