Gradle dependencies依赖关键字

3.+ 2.+ 描述
implementation 所依赖的库仅可在当前module使用,编译速度快
api compile 所依赖的库可在整工程使用,编译速度较implementation
provided compileOnly 仅在编译时有效,不参与打包,一般在发布no jar的库时候会用到,很少用
apk runtimeOnly 仅在生成apk的时候参与打包,编译时不参与
testImplementation testCompile 仅在单元测试代码的编译以及最终打包测试apk时有效
debugImplementation debugCompile 仅在debug模式的编译和最终的debug apk打包时有效
releaseImplementation releaseCompile 仅在Release模式的编译和最终的Release apk打包时有效

猜你喜欢

转载自blog.csdn.net/q4878802/article/details/98179074