gradle provided和compile的区别在于使用providedCompile的前提是apply plugin: 'war'
1、Gradle compile:
假如你的jar包存在代码依赖性,在编译、运行时候需要依赖代码,那就用compile
例如 :
compile 'org.springframework.boot:spring'
2、Gradle providedCompile:
假如你的jar包存在代码依赖性,但是在编译的时候才用得上,而运行时不需要,就用providedCompile
例如:
providedCompile 'org.springframework.boot:spring'
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‘
Photoshop|
Dreamweaver|
SVG|
WebGL|
Visual Studio|
PowerDesigner|
Eclipse|
Git|
Apache Ant|
Atom|
Composer|
CodeSmith|
Flex|
Gradle|
Maven|
Sublime Text3|
SVN|
Tableau|
Vim|
Chrome开发者工具|
OpenGL|
Unity|
Direct3D|
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....