Merge branch '1.5.x'

pull/6381/merge
Andy Wilkinson 8 years ago
commit 1782d778db

@ -39,8 +39,7 @@ diverge from the defaults.
By default, Spring Boot {spring-boot-version} requires http://www.java.com[Java 7] and By default, Spring Boot {spring-boot-version} requires http://www.java.com[Java 7] and
Spring Framework {spring-version} or above. You can use Spring Boot with Java 6 with some Spring Framework {spring-version} or above. You can use Spring Boot with Java 6 with some
additional configuration. See <<howto.adoc#howto-use-java-6>> for more details. Explicit additional configuration. See <<howto.adoc#howto-use-java-6>> for more details. Explicit
build support is provided for Maven (3.2+) and Gradle 2 (2.9 or later). Gradle 3 is not build support is provided for Maven (3.2+), and Gradle 2 (2.9 or later) and 3.
supported.
TIP: Although you can use Spring Boot with Java 6 or 7, we generally recommend Java 8 if TIP: Although you can use Spring Boot with Java 6 or 7, we generally recommend Java 8 if
at all possible. at all possible.
@ -205,9 +204,8 @@ scope.
[[getting-started-gradle-installation]] [[getting-started-gradle-installation]]
==== Gradle installation ==== Gradle installation
Spring Boot is compatible with Gradle 2 (2.9 or later). Gradle 2.14.1 is recommended and Spring Boot is compatible with Gradle 2 (2.9 or later) and Gradle 3. If you don't already
Gradle 3 is not supported. If you don't already have Gradle installed you can follow the have Gradle installed you can follow the instructions at http://www.gradle.org/.
instructions at http://www.gradle.org/.
Spring Boot dependencies can be declared using the `org.springframework.boot` `group`. Spring Boot dependencies can be declared using the `org.springframework.boot` `group`.
Typically your project will declare dependencies to one or more Typically your project will declare dependencies to one or more

@ -65,7 +65,7 @@
<dependency> <dependency>
<groupId>io.spring.gradle</groupId> <groupId>io.spring.gradle</groupId>
<artifactId>dependency-management-plugin</artifactId> <artifactId>dependency-management-plugin</artifactId>
<version>0.6.1.RELEASE</version> <version>1.0.0.RC1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>jline</groupId> <groupId>jline</groupId>

@ -16,13 +16,13 @@
package org.springframework.boot.gradle.dependencymanagement; package org.springframework.boot.gradle.dependencymanagement;
import groovy.lang.Closure;
import io.spring.gradle.dependencymanagement.DependencyManagementExtension;
import io.spring.gradle.dependencymanagement.DependencyManagementPlugin; import io.spring.gradle.dependencymanagement.DependencyManagementPlugin;
import io.spring.gradle.dependencymanagement.dsl.DependencyManagementExtension;
import io.spring.gradle.dependencymanagement.dsl.ImportsHandler;
import org.gradle.api.Action;
import org.gradle.api.Project; import org.gradle.api.Project;
import org.springframework.boot.gradle.PluginFeatures; import org.springframework.boot.gradle.PluginFeatures;
import org.springframework.util.ReflectionUtils;
/** /**
* {@link PluginFeatures} to configure dependency management. * {@link PluginFeatures} to configure dependency management.
@ -44,18 +44,11 @@ public class DependencyManagementPluginFeatures implements PluginFeatures {
project.getPlugins().apply(DependencyManagementPlugin.class); project.getPlugins().apply(DependencyManagementPlugin.class);
DependencyManagementExtension dependencyManagement = project.getExtensions() DependencyManagementExtension dependencyManagement = project.getExtensions()
.findByType(DependencyManagementExtension.class); .findByType(DependencyManagementExtension.class);
dependencyManagement.imports(new Closure<Void>(this) { dependencyManagement.imports(new Action<ImportsHandler>() {
@Override @Override
public Void call(Object... args) { public void execute(ImportsHandler importsHandler) {
try { importsHandler.mavenBom(SPRING_BOOT_BOM);
ReflectionUtils.findMethod(getDelegate().getClass(), "mavenBom",
String.class).invoke(getDelegate(), SPRING_BOOT_BOM);
return null;
}
catch (Exception ex) {
throw new IllegalStateException(ex);
}
} }
}); });

Loading…
Cancel
Save