gmariotti
11/02/2019, 9:09 AMbuild.gradle.kts
looks like this
gradlePlugin {
plugins {
create("customPlugin") {
id = "${project.group}.kotlin"
implementationClass = "${project.group}.kotlin.KotlinPlugin"
}
}
}
publishing {
publications {
create<MavenPublication>("plugin") {
from(components["kotlin"])
}
}
}
artifactory {
setContextUrl("<https://internal.artifactory>")
publish(closureOf<PublisherConfig> {
repository(delegateClosureOf<GroovyObject> {
val artifactoryUser: String? by rootProject
val artifactoryKey: String? by rootProject
setProperty("repoKey", "artifactoryRepoKey")
setProperty("username", System.getenv("ARTIFACTORY_USERNAME") ?: artifactoryUser)
setProperty("password", System.getenv("ARTIFACTORY_PASSWORD") ?: artifactoryKey)
setProperty("maven", true)
})
defaults(delegateClosureOf<ArtifactoryTask> {
publications("plugin")
setPublishArtifacts(true)
setProperties(mapOf("build.language" to "kotlin"))
})
})
}
gmariotti
11/02/2019, 9:29 AMbuildscript {}
syntax but not the plugins {}
one. Does anyone know why?octylFractal
11/02/2019, 3:34 PMgmariotti
11/02/2019, 5:51 PM