PlaguBot/bot/publish.gradle

66 lines
2.2 KiB
Groovy
Raw Normal View History

2020-12-08 09:00:54 +00:00
apply plugin: 'maven-publish'
2020-11-12 05:58:08 +00:00
2020-12-08 09:00:54 +00:00
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
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 sourcesJar
artifact javadocJar
2020-11-12 05:58:08 +00:00
2020-12-08 09:00:54 +00:00
pom {
resolveStrategy = Closure.DELEGATE_FIRST
description = ""
name = "PlaguBot ${project.name}"
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')
}
}
}
}
}
}