gradle配置中dependencies的provided依赖方式未生效报错
Dependencies
A rewrite of the old legacy software "depends.exe" in C# for Windows devs to troubleshoot dll load dependencies issues.
项目地址:https://gitcode.com/gh_mirrors/de/Dependencies
免费下载资源
·
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
provided 'org.projectlombok:lombok:1.18.2'
}
dependencies的provided依赖方式作用:
引入的依赖只参与编译,不参与打包。
错误信息:
Could not find method provided() for arguments [org.projectlombok:lombok:1.18.2] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
解决方案:
在build.gradle
文件中加入:
configurations {
provided
}
sourceSets.main.compileClasspath += configurations.provided
sourceSets.test.compileClasspath += configurations.provided
sourceSets.test.runtimeClasspath += configurations.provided
什么原因我也不知道
GitHub 加速计划 / de / Dependencies
8.61 K
704
下载
A rewrite of the old legacy software "depends.exe" in C# for Windows devs to troubleshoot dll load dependencies issues.
最近提交(Master分支:3 个月前 )
1997a400 - 2 年前
2f423539 - 2 年前
更多推荐
已为社区贡献1条内容
所有评论(0)