[英]Importing a source dependency with Gradle (Kotlin DSL)
I want to import version 1.0.0 of this project https://github.com/whichdigital/ksv as a source dependency in a Kotlin project using Gradle 6.3 with Kotlin DSL. I want to import version 1.0.0 of this project https://github.com/whichdigital/ksv as a source dependency in a Kotlin project using Gradle 6.3 with Kotlin DSL.
As the page tells me I added this into the settings.gradle.kts of my project正如页面告诉我的那样,我将此添加到我的项目的settings.gradle.kts
sourceControl {
gitRepository(java.net.URI.create("https://github.com/whichdigital/ksv.git")) {
producesModule("uk.co.whichdigital:ksv")
}
}
and using this dependency in my build.gradle.kts file:并在我的build.gradle.kts文件中使用此依赖项:
implementation("uk.co.whichdigital:ksv:1.0.0")
trying to import tagged version/release 1.0.0 of the KSV repo.尝试导入 KSV 存储库的标记版本/发行版 1.0.0。 But building my project (importing the KSV repo) fails with following expection:
但是构建我的项目(导入 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 :
I'm actually also the person who wrote/published the KSV-repository, so if there's some configuration that I missed, I can add it in the imported or importing project.我实际上也是编写/发布 KSV 存储库的人,所以如果我遗漏了一些配置,我可以将其添加到导入或导入项目中。
"uk.co.whichdigital:ksv:1.0.0" group id is wrong.
“uk.co.whichdigital:ksv:1.0.0”组 ID 错误。
Can you please try你能试试吗
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")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.