Merge branch '1.5.x'

pull/7530/merge
Andy Wilkinson 8 years ago
commit 995b962807

@ -172,32 +172,33 @@ dependency management provided by `spring-boot-dependencies`.
[[build-tool-plugins-including-the-gradle-plugin]] [[build-tool-plugins-including-the-gradle-plugin]]
=== Including the plugin === Including the plugin
To use the Spring Boot Gradle Plugin simply include a `buildscript` dependency and apply ifeval::["{spring-boot-repo}" == "release"]
the `spring-boot` plugin: To use the Spring Boot Gradle Plugin configure it using the `plugins` block:
[source,groovy,indent=0,subs="verbatim,attributes"] [source,groovy,indent=0,subs="verbatim,attributes"]
---- ----
buildscript { plugins {
dependencies { id 'org.springframework.boot' version '{spring-boot-version}'
classpath("org.springframework.boot:spring-boot-gradle-plugin:{spring-boot-version}")
} }
}
apply plugin: 'org.springframework.boot'
---- ----
endif::[]
If you are using a milestone or snapshot release you will also need to add appropriate ifeval::["{spring-boot-repo}" != "release"]
`repositories` reference: To use the Spring Boot Gradle Plugin simply include a `buildscript` dependency and apply
the `spring-boot` plugin:
[source,groovy,indent=0,subs="verbatim,attributes"] [source,groovy,indent=0,subs="verbatim,attributes"]
---- ----
buildscript { buildscript {
repositories { repositories {
maven.url "http://repo.spring.io/snapshot" maven { url 'http://repo.spring.io/snapshot' }
maven.url "http://repo.spring.io/milestone" maven { url 'http://repo.spring.io/milestone' }
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:{spring-boot-version}''
} }
// ...
} }
apply plugin: 'org.springframework.boot'
---- ----
endif::[]

@ -387,8 +387,6 @@ With Gradle, the equivalent configuration would be:
[source,groovy,indent=0,subs="verbatim,quotes,attributes"] [source,groovy,indent=0,subs="verbatim,quotes,attributes"]
---- ----
apply plugin: 'org.springframework.boot'
springBoot { springBoot {
executable = true executable = true
} }

@ -226,22 +226,28 @@ Here is a typical `build.gradle` file:
[source,groovy,indent=0,subs="verbatim,attributes"] [source,groovy,indent=0,subs="verbatim,attributes"]
---- ----
ifeval::["{spring-boot-repo}" == "release"]
plugins {
id 'org.springframework.boot' version '{spring-boot-version}'
id 'java'
}
endif::[]
ifeval::["{spring-boot-repo}" != "release"]
buildscript { buildscript {
repositories { repositories {
jcenter() jcenter()
ifndef::release[] maven { url 'http://repo.spring.io/snapshot' }
maven { url "http://repo.spring.io/snapshot" } maven { url 'http://repo.spring.io/milestone' }
maven { url "http://repo.spring.io/milestone" }
endif::release[]
} }
dependencies { dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:{spring-boot-version}") classpath 'org.springframework.boot:spring-boot-gradle-plugin:{spring-boot-version}'
} }
} }
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'org.springframework.boot' apply plugin: 'org.springframework.boot'
endif::[]
jar { jar {
baseName = 'myproject' baseName = 'myproject'
version = '0.0.1-SNAPSHOT' version = '0.0.1-SNAPSHOT'
@ -249,10 +255,10 @@ endif::release[]
repositories { repositories {
jcenter() jcenter()
ifndef::release[] ifeval::["{spring-boot-repo}" != "release"]
maven { url "http://repo.spring.io/snapshot" } maven { url "http://repo.spring.io/snapshot" }
maven { url "http://repo.spring.io/milestone" } maven { url "http://repo.spring.io/milestone" }
endif::release[] endif::[]
} }
dependencies { dependencies {

@ -214,8 +214,6 @@ Maven, there is no "`super parent`" to import to share some configuration.
[source,groovy,indent=0,subs="attributes"] [source,groovy,indent=0,subs="attributes"]
---- ----
apply plugin: 'java'
repositories { repositories {
ifeval::["{spring-boot-repo}" != "release"] ifeval::["{spring-boot-repo}" != "release"]
maven { url "http://repo.spring.io/snapshot" } maven { url "http://repo.spring.io/snapshot" }
@ -240,32 +238,33 @@ managed by Spring Boot:
[source,groovy,indent=0,subs="attributes"] [source,groovy,indent=0,subs="attributes"]
---- ----
ifeval::["{spring-boot-repo}" == "release"]
plugins {
id 'org.springframework.boot' version '{spring-boot-version}'
id 'java'
}
endif::[]
ifeval::["{spring-boot-repo}" != "release"]
buildscript { buildscript {
repositories { repositories {
ifeval::["{spring-boot-repo}" != "release"]
maven { url "http://repo.spring.io/snapshot" }
maven { url "http://repo.spring.io/milestone" }
endif::[]
ifeval::["{spring-boot-repo}" == "release"]
jcenter() jcenter()
endif::[] maven { url 'http://repo.spring.io/snapshot' }
maven { url 'http://repo.spring.io/milestone' }
} }
dependencies { dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:{spring-boot-version}") classpath 'org.springframework.boot:spring-boot-gradle-plugin:{spring-boot-version}'
} }
} }
apply plugin: 'java' apply plugin: 'java'
apply plugin: 'org.springframework.boot' apply plugin: 'org.springframework.boot'
endif::[]
repositories { repositories {
ifeval::["{spring-boot-repo}" != "release"]
maven { url "http://repo.spring.io/snapshot" }
maven { url "http://repo.spring.io/milestone" }
endif::[]
ifeval::["{spring-boot-repo}" == "release"]
jcenter() jcenter()
ifeval::["{spring-boot-repo}" != "release"]
maven { url 'http://repo.spring.io/snapshot' }
maven { url 'http://repo.spring.io/milestone' }
endif::[] endif::[]
} }

Loading…
Cancel
Save