SauceNaoAPI/publish.gradle

69 lines
2.2 KiB
Groovy
Raw Normal View History

2020-12-02 08:02:15 +00:00
apply plugin: 'maven-publish'
2019-02-20 04:06:04 +00:00
2020-12-02 08:02:15 +00:00
task javadocsJar(type: Jar) {
classifier = 'javadoc'
}
task sourceJar (type : Jar) {
classifier = 'sources'
2019-02-20 04:06:04 +00:00
}
2020-12-02 08:02:15 +00:00
afterEvaluate {
project.publishing.publications.all {
// rename artifacts
groupId "${project.group}"
2020-08-22 17:00:07 +00:00
if (it.name.contains('kotlinMultiplatform')) {
2020-12-02 08:02:15 +00:00
artifactId = "${project.name}"
artifact sourceJar
2020-08-22 17:00:07 +00:00
} else {
2020-12-02 08:02:15 +00:00
artifactId = "${project.name}-$name"
2020-08-22 17:00:07 +00:00
}
2020-12-02 08:02:15 +00:00
}
2020-08-22 17:00:07 +00:00
}
2020-12-02 08:02:15 +00:00
publishing {
publications.all {
artifact javadocsJar
pom {
description = "SauceNao API library"
name = "SauceNao API"
url = "https://insanusmokrassar.github.io/${project.name}"
scm {
developerConnection = "scm:git:[fetch=]https://github.com/insanusmokrassar/${project.name}.git[push=]https://github.com/insanusmokrassar/${project.name}.git"
url = "https://github.com/insanusmokrassar/${project.name}.git"
}
developers {
developer {
id = "InsanusMokrassar"
name = "Ovsyannikov Alexey"
email = "ovsyannikov.alexey95@gmail.com"
}
}
licenses {
license {
name = "Apache Software License 2.0"
url = "https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"
}
}
}
repositories {
maven {
name = "bintray"
2020-12-02 08:44:25 +00:00
url = uri("https://api.bintray.com/maven/${project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : System.getenv('BINTRAY_USER')}/SauceNaoAPI/${project.name}/;publish=1;override=1")
2020-12-02 08:02:15 +00:00
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')
}
}
}
}
}