gradle providedCompile 与compile区别

Gradle compile:
 如果你的jar包/依赖代码 在编译的时候需要依赖,在运行的时候也需要,那么就用compile
例如 :

compile 'org.springframework.boot:spring-boot-starter-websocket:1.1.6.RELEASE'


Gradle providedCompile:
如果你的jar包/依赖代码 仅在编译的时候需要,但是在运行时不需要依赖,就用providedCompile
例如:

providedCompile 'org.springframework.boot:spring-boot-starter-tomcat:1.1.6.RELEASE'

参考:Gradle compile and providedCompile Example

转载请注明:http://www.cnblogs.com/langtianya/p/5212151.html

posted @ 2016-02-24 10:50  jack_ou  阅读(8622)  评论(1编辑  收藏  举报