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 {
|
2018-12-28 02:40:24 +00:00
|
|
|
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 {
|
|
|
|
if (it.getName() == "module.json") {
|
|
|
|
File file = it.getFile()
|
|
|
|
String directorySubname = file.parentFile.name
|
|
|
|
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 {
|
|
|
|
it.exclude()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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}"
|
2020-01-06 16:43:05 +00:00
|
|
|
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
|