From 6dddceacad8c3247a0b50b1f8269da35ffe2a41a Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 30 Jan 2018 20:08:04 -0800 Subject: [PATCH] Always include plugin classpath in sample gradle Update a couple of the `spring-boot-gradle-plugin` sample gradle flies so that they include the running classpath. The additional lines are contained within a tag which is ultimately filtered from the final documentation. Fixes gh-11857 --- .../src/main/asciidoc/getting-started.adoc | 6 +++--- .../gradle/getting-started/apply-plugin-milestone.gradle | 3 +++ .../gradle/getting-started/apply-plugin-snapshot.gradle | 3 +++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/getting-started.adoc b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/getting-started.adoc index 0ec83436f45d..eacc5e9d5668 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/getting-started.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/getting-started.adoc @@ -14,13 +14,13 @@ endif::[] ifeval::["{version-type}" == "MILESTONE"] [source,groovy,indent=0,subs="verbatim,attributes"] ---- -include::../gradle/getting-started/apply-plugin-milestone.gradle[] +include::../gradle/getting-started/apply-plugin-milestone.gradle[tags=!buildclasspath] ---- endif::[] ifeval::["{version-type}" == "SNAPSHOT"] [source,groovy,indent=0,subs="verbatim,attributes"] ---- -include::../gradle/getting-started/apply-plugin-snapshot.gradle[] +include::../gradle/getting-started/apply-plugin-snapshot.gradle[tags=!buildclasspath] ---- endif::[] @@ -40,4 +40,4 @@ include::../gradle/getting-started/typical-plugins.gradle[tags=apply] ---- To learn more about how the Spring Boot plugin behaves when other plugins are applied -please see the section on <>. \ No newline at end of file +please see the section on <>. diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/getting-started/apply-plugin-milestone.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/getting-started/apply-plugin-milestone.gradle index 0302ec6f4de7..aecd3459382a 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/getting-started/apply-plugin-milestone.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/getting-started/apply-plugin-milestone.gradle @@ -5,6 +5,9 @@ buildscript { dependencies { classpath 'org.springframework.boot:spring-boot-gradle-plugin:{version}' +// tag::buildclasspath[] + classpath files(pluginClasspath.split(',')) +// end::buildclasspath[] } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/getting-started/apply-plugin-snapshot.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/getting-started/apply-plugin-snapshot.gradle index 5872a19b7739..b37d04520dd4 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/getting-started/apply-plugin-snapshot.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/getting-started/apply-plugin-snapshot.gradle @@ -5,6 +5,9 @@ buildscript { dependencies { classpath 'org.springframework.boot:spring-boot-gradle-plugin:{version}' +// tag::buildclasspath[] + classpath files(pluginClasspath.split(',')) +// end::buildclasspath[] } }