Skip to content

Commit 0c02450

Browse files
committed
Recommend using compileOnly rather than the propdeps plugin
Closes gh-12573
1 parent 1145eec commit 0c02450

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

spring-boot-docs/src/main/asciidoc/appendix-configuration-metadata.adoc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -731,13 +731,12 @@ an optional dependency, for example with Maven you would add:
731731
</dependency>
732732
----
733733

734-
With Gradle, you can use the https://github.com/spring-gradle-plugins/propdeps-plugin[propdeps-plugin]
735-
and specify:
734+
With Gradle you would add:
736735

737736
[source,groovy,indent=0,subs="verbatim,quotes,attributes"]
738737
----
739738
dependencies {
740-
optional "org.springframework.boot:spring-boot-configuration-processor"
739+
compileOnly "org.springframework.boot:spring-boot-configuration-processor"
741740
}
742741
743742
compileJava.dependsOn(processResources)

spring-boot-docs/src/main/asciidoc/index.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ Phillip Webb; Dave Syer; Josh Long; Stéphane Nicoll; Rob Winch; Andy Wilkinson;
4747
:spring-data-mongo-javadoc: http://docs.spring.io/spring-data/mongodb/docs/current/api/org/springframework/data/mongodb
4848
:spring-data-rest-javadoc: http://docs.spring.io/spring-data/rest/docs/current/api/org/springframework/data/rest
4949
:gradle-userguide: http://www.gradle.org/docs/current/userguide
50-
:propdeps-plugin: https://github.com/spring-projects/gradle-plugins/tree/master/propdeps-plugin
5150
:ant-manual: http://ant.apache.org/manual
5251
:code-examples: ../java/org/springframework/boot
5352
:test-examples: ../../test/java/org/springframework/boot

spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -772,17 +772,15 @@ devtools support, simply add the module dependency to your build:
772772
[source,groovy,indent=0,subs="attributes"]
773773
----
774774
dependencies {
775-
compile("org.springframework.boot:spring-boot-devtools")
775+
compileOnly("org.springframework.boot:spring-boot-devtools")
776776
}
777777
----
778778

779779
NOTE: Developer tools are automatically disabled when running a fully packaged
780780
application. If your application is launched using `java -jar` or if it's started using a
781781
special classloader, then it is considered a "`production application`". Flagging the
782-
dependency as optional is a best practice that prevents devtools from being transitively
783-
applied to other modules using your project. Gradle does not support `optional`
784-
dependencies out-of-the-box so you may want to have a look to the
785-
{propdeps-plugin}[`propdeps-plugin`] in the meantime.
782+
dependency as optional in Maven or using `compileOnly` in Gradle is a best practice that
783+
prevents devtools from being transitively applied to other modules using your project.
786784

787785
TIP: repackaged archives do not contain devtools by default. If you want to use
788786
<<using-boot-devtools-remote,certain remote devtools feature>>, you'll need to disable the

0 commit comments

Comments
 (0)