Fix sonatype publishing
This commit is contained in:
parent
e0b9fe2306
commit
3b368a3125
@ -2,8 +2,10 @@ plugins {
|
||||
`java-gradle-plugin`
|
||||
`kotlin-dsl`
|
||||
`maven-publish`
|
||||
signing
|
||||
id("de.marcphilipp.nexus-publish") version "0.4.0"
|
||||
id("org.jetbrains.changelog") version "1.0.0"
|
||||
id("org.jetbrains.dokka") version "1.4.20"
|
||||
}
|
||||
|
||||
group = "ru.mipt.npm"
|
||||
@ -89,12 +91,27 @@ gradlePlugin {
|
||||
}
|
||||
|
||||
publishing {
|
||||
val vcs = "https://github.com/mipt-npm/scientifik-gradle-tools"
|
||||
val vcs = "https://github.com/mipt-npm/gradle-tools"
|
||||
|
||||
val sourcesJar: Jar by tasks.creating(Jar::class) {
|
||||
archiveClassifier.set("sources")
|
||||
from(sourceSets.named("main").get().allSource)
|
||||
}
|
||||
|
||||
val javadocsJar: Jar by tasks.creating(Jar::class) {
|
||||
group = "documentation"
|
||||
archiveClassifier.set("javadoc")
|
||||
from(tasks.dokkaHtml)
|
||||
}
|
||||
|
||||
// Process each publication we have in this project
|
||||
publications.filterIsInstance<MavenPublication>().forEach { publication ->
|
||||
|
||||
publication.pom {
|
||||
publication.apply {
|
||||
artifact(sourcesJar)
|
||||
artifact(javadocsJar)
|
||||
|
||||
pom {
|
||||
name.set(project.name)
|
||||
description.set(project.description)
|
||||
url.set(vcs)
|
||||
@ -121,6 +138,7 @@ publishing {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val sonatypeUser: String? by project
|
||||
val sonatypePassword: String? by project
|
||||
@ -136,6 +154,10 @@ publishing {
|
||||
}
|
||||
}
|
||||
|
||||
signing {
|
||||
useGpgCmd()
|
||||
sign(publications)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user