core/postssystem.core/maven.publish.gradle

66 lines
1.7 KiB
Groovy
Raw Normal View History

apply plugin: 'maven-publish'
apply plugin: 'signing'
2019-11-19 19:36:26 +00:00
task javadocsJar(type: Jar) {
classifier = 'javadoc'
}
2019-11-19 19:36:26 +00:00
afterEvaluate {
project.publishing.publications.all {
// rename artifacts
groupId "${project.group}"
if (it.name.contains('kotlinMultiplatform')) {
artifactId = "${project.name}"
} else {
artifactId = "${project.name}-$name"
}
}
}
publishing {
2019-11-19 19:36:26 +00:00
publications.all {
artifact javadocsJar
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
description "${project_public_description}"
name "${project_public_name}"
url "${project_url}"
2019-11-19 19:36:26 +00:00
scm {
developerConnection "scm:git:[fetch=]${project_vcs}[push=]${project_vcs}"
url "${project_vcs}"
}
developers {
developer {
id "InsanusMokrassar"
name "Ovsyannikov Alexey"
email "ovsyannikov.alexey95@gmail.com"
}
2019-11-19 19:36:26 +00:00
developer {
id "mi-ast"
name "Michail Astafiev"
email "astaf65@gmail.com"
}
}
2019-11-19 19:36:26 +00:00
licenses {
license {
name "${project_public_license_fullname}"
url "${project_public_license_url}"
2019-11-19 19:36:26 +00:00
distribution "repo"
}
}
}
}
}
}
signing {
useGpgCmd()
2019-11-19 19:36:26 +00:00
sign(publishing.publications)
}