Dependencies should no longer be declared using the "compile"and “runtime” configurations
不应再使用“compile”和“runtime”配置声明依赖关系。
自从 Gradle 3.4 以后,已经放弃在 Java 生态系统插件中使用 compile 和 runtime 配置。
这些配置用于编译和运行来自于 main 源码集的代码。其他的源码集创建相似的配置(例如,用于 test 源码集的 testCompile 和 testRuntime ),也不应该被使用。implementation , api , compileOnly 和 runtimeOnly 配置应该被用于声明依赖,并且,compileClasspath 和 runtimeClasspath 配置用于解析依赖。
要了解更多关于各种配置之间的关系,敬请期待!
自Gradle3.4起,compile和runtime配置已被弃用。本文介绍如何使用新的implementation, api, compileOnly及runtimeOnly配置声明依赖,以及如何利用compileClasspath和runtimeClasspath配置进行依赖解析。

2306

被折叠的 条评论
为什么被折叠?



