krontab/maven.publish.gradle

66 lines
1.7 KiB
Groovy
Raw Normal View History

2019-05-21 10:14:09 +00:00
apply plugin: 'maven-publish'
apply plugin: 'signing'
2019-11-19 19:36:10 +00:00
task javadocsJar(type: Jar) {
classifier = 'javadoc'
2019-05-21 10:14:09 +00:00
}
2019-11-19 19:36:10 +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"
2019-05-21 10:14:09 +00:00
}
}
}
publishing {
2019-11-19 19:36:10 +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-05-21 10:14:09 +00:00
2019-11-19 19:36:10 +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-05-21 10:14:09 +00:00
}
2019-11-19 19:36:10 +00:00
developer {
id "mi-ast"
name "Michail Astafiev"
email "astaf65@gmail.com"
}
}
2019-05-21 10:14:09 +00:00
2019-11-19 19:36:10 +00:00
licenses {
license {
name "The Apache Software License, Version 2.0"
url "${project_url}/src/master/LICENSE"
distribution "repo"
2019-05-21 10:14:09 +00:00
}
}
}
}
}
}
signing {
useGpgCmd()
2019-11-19 19:36:10 +00:00
sign(publishing.publications)
2019-05-21 10:14:09 +00:00
}