Recommend using compileOnly rather than the propdeps plugin
Closes gh-12573
This commit is contained in:
		
							parent
							
								
									1145eec2b2
								
							
						
					
					
						commit
						0c0245014c
					
				|  | @ -731,13 +731,12 @@ an optional dependency, for example with Maven you would add: | ||||||
| 	</dependency> | 	</dependency> | ||||||
| ---- | ---- | ||||||
| 
 | 
 | ||||||
| With Gradle, you can use the https://github.com/spring-gradle-plugins/propdeps-plugin[propdeps-plugin] | With Gradle you would add: | ||||||
| and specify: |  | ||||||
| 
 | 
 | ||||||
| [source,groovy,indent=0,subs="verbatim,quotes,attributes"] | [source,groovy,indent=0,subs="verbatim,quotes,attributes"] | ||||||
| ---- | ---- | ||||||
| 	dependencies { | 	dependencies { | ||||||
| 		optional "org.springframework.boot:spring-boot-configuration-processor" | 		compileOnly "org.springframework.boot:spring-boot-configuration-processor" | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	compileJava.dependsOn(processResources) | 	compileJava.dependsOn(processResources) | ||||||
|  |  | ||||||
|  | @ -47,7 +47,6 @@ Phillip Webb; Dave Syer; Josh Long; Stéphane Nicoll; Rob Winch; Andy Wilkinson; | ||||||
| :spring-data-mongo-javadoc: http://docs.spring.io/spring-data/mongodb/docs/current/api/org/springframework/data/mongodb | :spring-data-mongo-javadoc: http://docs.spring.io/spring-data/mongodb/docs/current/api/org/springframework/data/mongodb | ||||||
| :spring-data-rest-javadoc: http://docs.spring.io/spring-data/rest/docs/current/api/org/springframework/data/rest | :spring-data-rest-javadoc: http://docs.spring.io/spring-data/rest/docs/current/api/org/springframework/data/rest | ||||||
| :gradle-userguide: http://www.gradle.org/docs/current/userguide | :gradle-userguide: http://www.gradle.org/docs/current/userguide | ||||||
| :propdeps-plugin: https://github.com/spring-projects/gradle-plugins/tree/master/propdeps-plugin |  | ||||||
| :ant-manual: http://ant.apache.org/manual | :ant-manual: http://ant.apache.org/manual | ||||||
| :code-examples: ../java/org/springframework/boot | :code-examples: ../java/org/springframework/boot | ||||||
| :test-examples: ../../test/java/org/springframework/boot | :test-examples: ../../test/java/org/springframework/boot | ||||||
|  |  | ||||||
|  | @ -772,17 +772,15 @@ devtools support, simply add the module dependency to your build: | ||||||
| [source,groovy,indent=0,subs="attributes"] | [source,groovy,indent=0,subs="attributes"] | ||||||
| ---- | ---- | ||||||
| 	dependencies { | 	dependencies { | ||||||
| 		compile("org.springframework.boot:spring-boot-devtools") | 		compileOnly("org.springframework.boot:spring-boot-devtools") | ||||||
| 	} | 	} | ||||||
| ---- | ---- | ||||||
| 
 | 
 | ||||||
| NOTE: Developer tools are automatically disabled when running a fully packaged | NOTE: Developer tools are automatically disabled when running a fully packaged | ||||||
| application. If your application is launched using `java -jar` or if it's started using a | application. If your application is launched using `java -jar` or if it's started using a | ||||||
| special classloader, then it is considered a "`production application`". Flagging the | special classloader, then it is considered a "`production application`". Flagging the | ||||||
| dependency as optional is a best practice that prevents devtools from being transitively | dependency as optional in Maven or using `compileOnly` in Gradle is a best practice that | ||||||
| applied to other modules using your project. Gradle does not support `optional` | prevents devtools from being transitively applied to other modules using your project. | ||||||
| dependencies out-of-the-box so you may want to have a look to the |  | ||||||
| {propdeps-plugin}[`propdeps-plugin`] in the meantime. |  | ||||||
| 
 | 
 | ||||||
| TIP: repackaged archives do not contain devtools by default. If you want to use | TIP: repackaged archives do not contain devtools by default. If you want to use | ||||||
| <<using-boot-devtools-remote,certain remote devtools feature>>, you'll need to disable the | <<using-boot-devtools-remote,certain remote devtools feature>>, you'll need to disable the | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue