1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-18 06:13:47 +00:00
tgbotapi/TelegramBotAPI/publish.gradle

55 lines
2.0 KiB
Groovy
Raw Normal View History

2018-12-27 03:40:53 +00:00
apply plugin: 'com.jfrog.bintray'
2019-12-03 05:07:25 +00:00
apply from: "maven.publish.gradle"
2018-12-28 01:39:59 +00:00
2018-12-27 03:40:53 +00:00
bintray {
user = project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : System.getenv('BINTRAY_USER')
key = project.hasProperty('BINTRAY_KEY') ? project.property('BINTRAY_KEY') : System.getenv('BINTRAY_KEY')
2020-01-13 05:26:52 +00:00
filesSpec {
2020-01-13 15:47:30 +00:00
from "${buildDir}/publications/"
eachFile {
2020-01-15 15:41:52 +00:00
String directorySubname = it.getFile().parentFile.name
2020-01-13 15:47:30 +00:00
if (it.getName() == "module.json") {
if (directorySubname == "kotlinMultiplatform") {
it.setPath("${project.name}/${project.version}/${project.name}-${project.version}.module")
} else {
it.setPath("${project.name}-${directorySubname}/${project.version}/${project.name}-${directorySubname}-${project.version}.module")
}
} else {
2020-01-15 15:41:52 +00:00
if (directorySubname == "kotlinMultiplatform" && it.getName() == "pom-default.xml") {
it.setPath("${project.name}/${project.version}/${project.name}-${project.version}.pom")
} else {
it.exclude()
}
2020-01-13 15:47:30 +00:00
}
}
into "${project.group}".replace(".", "/")
2020-01-13 05:26:52 +00:00
}
2018-12-27 03:40:53 +00:00
pkg {
2019-12-03 05:07:25 +00:00
repo = "StandardRepository"
2018-12-27 03:40:53 +00:00
name = "${project.name}"
2019-12-03 05:07:25 +00:00
vcsUrl = "https://github.com/InsanusMokrassar/TelegramBotAPI"
licenses = ["Apache-2.0"]
2018-12-27 03:40:53 +00:00
version {
name = "${project.version}"
released = new Date()
2019-12-03 05:07:25 +00:00
vcsTag = "${project.version}"
gpg {
sign = true
passphrase = project.hasProperty('signing.gnupg.passphrase') ? project.property('signing.gnupg.passphrase') : System.getenv('signing.gnupg.passphrase')
}
2018-12-27 03:40:53 +00:00
}
}
}
2019-12-03 05:07:25 +00:00
bintrayUpload.doFirst {
2020-01-13 17:21:57 +00:00
publications = publishing.publications.collect {
2020-01-13 17:21:07 +00:00
if (it.name.contains('kotlinMultiplatform')) {
null
} else {
it.name
}
2020-01-13 17:21:57 +00:00
} - null
2019-12-03 05:07:25 +00:00
}
bintrayUpload.dependsOn publishToMavenLocal