使用Gradle(Kotlin DSL)导入源依赖项
我想导入此项目的1.0.0版 在使用Gradle 6.3和Kotlin DSL的Kotlin项目中作为 正如页面告诉我的,我将其添加到了我的项目的设置.gradle.kts使用Gradle(Kotlin DSL)导入源依赖项,kotlin,gradle,gradle-kotlin-dsl,Kotlin,Gradle,Gradle Kotlin Dsl,我想导入此项目的1.0.0版 在使用Gradle 6.3和Kotlin DSL的Kotlin项目中作为 正如页面告诉我的,我将其添加到了我的项目的设置.gradle.kts sourceControl { gitRepository(java.net.URI.create("https://github.com/whichdigital/ksv.git")) { producesModule("uk.co.whichdigital:ksv") } } 并在我的b
sourceControl {
gitRepository(java.net.URI.create("https://github.com/whichdigital/ksv.git")) {
producesModule("uk.co.whichdigital:ksv")
}
}
并在我的build.gradle.kts文件中使用此依赖项:
implementation("uk.co.whichdigital:ksv:1.0.0")
正在尝试导入KSV repo的标记版本/发行版1.0.0。但构建我的项目(导入KSV回购协议)失败,原因如下:
TaskDependencyResolveException: Could not determine the dependencies of task ':bootJar'.
...
Caused by: DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all task dependencies for configuration ':runtimeClasspath'.
....
Caused by: ModuleVersionResolveException: Git repository at https://github.com/whichdigital/ksv.git did not contain a project publishing the specified dependency.
Required by:
project :
实际上,我也是编写/发布KSV存储库的人,因此如果我遗漏了一些配置,我可以将其添加到导入或导入项目中
“uk.co.whichdigital:ksv:1.0.0”组id错误
你能试试吗
sourceControl {
gitRepository(java.net.URI.create("https://github.com/whichdigital/ksv.git")) {
producesModule("uk.co.whichdigital.ksv:ksv")
}
}
implementation(“uk.co.whichdigital.ksv:ksv:1.0.0”)
为什么不下载源代码并作为模块导入呢?因为我希望它是一个外部依赖项(如果是本地的,只会诱使团队成员在本地修改代码,而不是修复存储库版本)。现在有了Ramachandran Marugian的修复(通过修复组id),我可以:)