2019-05-21 10:14:09 +00:00
|
|
|
apply plugin: 'com.jfrog.bintray'
|
|
|
|
|
|
|
|
apply from: "maven.publish.gradle"
|
|
|
|
|
|
|
|
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:15:14 +00:00
|
|
|
filesSpec {
|
2020-01-13 16:00:58 +00:00
|
|
|
from "${buildDir}/publications/"
|
|
|
|
eachFile {
|
2020-01-15 14:39:39 +00:00
|
|
|
String directorySubname = it.getFile().parentFile.name
|
2020-01-13 16:00:58 +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 14:39:39 +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 16:00:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
into "${project.group}".replace(".", "/")
|
2020-01-13 05:15:14 +00:00
|
|
|
}
|
2019-05-21 10:14:09 +00:00
|
|
|
pkg {
|
2020-01-08 08:28:57 +00:00
|
|
|
repo = "InsanusMokrassar"
|
2019-05-21 10:14:09 +00:00
|
|
|
name = "${project.name}"
|
2020-01-08 08:28:57 +00:00
|
|
|
vcsUrl = "https://git.insanusmokrassar.com/InsanusMokrassar/krontab"
|
|
|
|
licenses = ["Apache-2.0"]
|
2020-01-15 15:04:03 +00:00
|
|
|
override=true
|
2019-05-21 10:14:09 +00:00
|
|
|
version {
|
|
|
|
name = "${project.version}"
|
|
|
|
released = new Date()
|
2019-11-19 19:36:10 +00:00
|
|
|
vcsTag = "${project.version}"
|
2020-01-08 08:28:57 +00:00
|
|
|
gpg {
|
|
|
|
sign = true
|
|
|
|
passphrase = project.hasProperty('signing.gnupg.passphrase') ? project.property('signing.gnupg.passphrase') : System.getenv('signing.gnupg.passphrase')
|
|
|
|
}
|
2019-05-21 10:14:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-11-19 19:36:10 +00:00
|
|
|
|
|
|
|
bintrayUpload.doFirst {
|
|
|
|
publications = publishing.publications.collect {
|
2020-01-13 17:23:13 +00:00
|
|
|
if (it.name.contains('kotlinMultiplatform')) {
|
|
|
|
null
|
|
|
|
} else {
|
|
|
|
it.name
|
|
|
|
}
|
|
|
|
} - null
|
2019-11-19 19:36:10 +00:00
|
|
|
}
|
|
|
|
|
2020-01-08 08:28:57 +00:00
|
|
|
bintrayUpload.dependsOn publishToMavenLocal
|