I would like to switch my libraries to Kotlin Gradle Script, but I cannot find a way to configure the uploadArchive task.
Here is the groovy kotlin Script that I would like to translate:
uploadArchives {
repositories {
mavenDeployer {
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
}
}
}
}
Until now, I realized that it should start with
task<Upload>("uploadArchives") {
}
... And that is pretty much!
AFAIU, in Groovy the task is Upload"complemented" by MavenPlugin. How does it work in Kotlin?
source
share