PlaguBot/plugin/publish.gradle

78 lines
2.8 KiB
Groovy
Raw Normal View History

2020-12-08 09:00:54 +00:00
apply plugin: 'maven-publish'
2021-02-16 17:34:47 +00:00
apply plugin: 'signing'
2020-11-12 05:58:08 +00:00
2020-12-08 09:00:54 +00:00
task javadocJar(type: Jar) {
from javadoc
classifier = 'javadoc'
2020-11-12 05:58:08 +00:00
}
2020-12-08 09:00:54 +00:00
publishing {
publications {
maven(MavenPublication) {
from components.java
artifact javadocJar
2020-11-12 05:58:08 +00:00
2020-12-08 09:00:54 +00:00
pom {
resolveStrategy = Closure.DELEGATE_FIRST
2021-02-16 17:34:47 +00:00
description = "Base dependency for whole PlaguBot project"
name = "PlaguBot Plugin"
2020-12-08 09:00:54 +00:00
url = "https://github.com/InsanusMokrassar/PlaguBot"
scm {
developerConnection = "scm:git:[fetch=]ssh://git@github.com/InsanusMokrassar/PlaguBot.git[push=]ssh://git@github.com/InsanusMokrassar/PlaguBot.git"
url = "ssh://git@github.com/InsanusMokrassar/PlaguBot.git"
}
developers {
developer {
id = "InsanusMokrassar"
name = "Aleksei Ovsiannikov"
email = "ovsyannikov.alexey95@gmail.com"
}
}
licenses {
license {
name = "Apache Software License 2.0"
url = "https://github.com/InsanusMokrassar/PlaguBot/LICENSE"
}
}
}
repositories {
maven {
name = "bintray"
url = uri("https://api.bintray.com/maven/${project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : System.getenv('BINTRAY_USER')}/PlaguBot/${project.name}/;publish=1;override=1")
credentials {
username = project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : System.getenv('BINTRAY_USER')
password = project.hasProperty('BINTRAY_KEY') ? project.property('BINTRAY_KEY') : System.getenv('BINTRAY_KEY')
}
}
2021-02-16 17:34:47 +00:00
maven {
name = "sonatype"
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER')
password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD')
}
}
2020-12-08 09:00:54 +00:00
}
}
}
2021-02-16 17:34:47 +00:00
}
signing {
useGpgCmd()
sign publishing.publications
}