试图将项目转换为 GSK
我们在 Groovy 中有这个:
subprojects {
plugins.withType(MavenPlugin) {
tasks.withType(Upload) {
repositories {
mavenDeployer {
mavenLocal()
repository(url: "xxx") {
authentication(userName: "yyy", password: "zzz")
}
snapshotRepository(url: "xxx") {
authentication(userName: "yyy", password: "zzz")
}
pom.artifactId = "${project.name}"
pom.version = "$version"
}
}
}
}
}
在葛兰素史克,我做到了这一点:
plugins.withType(MavenPlugin::class.java) {
tasks.withType(Upload::class.java) {
val maven = the<MavenRepositoryHandlerConvention>()
maven.mavenDeployer {
// ???
}
}
}
我如何实际构造/配置存储库对象以分配给 MavenDeployer 的存储库/快照存储库属性?Groovy 摘录中的 mavenLocal() 对部署者有什么作用,我如何在 Kotlin 中调用它(因为它是 RepositoryHandler 上的一个方法,而不是 MavenDeployer)?问题,问题
使用 Gradle 4.4