mirror of
https://github.com/InsanusMokrassar/SDI.git
synced 2024-12-27 11:07:22 +00:00
59 lines
2.1 KiB
Groovy
59 lines
2.1 KiB
Groovy
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')
|
|
filesSpec {
|
|
from "${buildDir}/publications/"
|
|
eachFile {
|
|
String directorySubname = it.getFile().parentFile.name
|
|
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 {
|
|
if (directorySubname == "kotlinMultiplatform" && it.getName() == "pom-default.xml") {
|
|
it.setPath("${project.name}/${project.version}/${project.name}-${project.version}.pom")
|
|
} else {
|
|
it.exclude()
|
|
}
|
|
}
|
|
}
|
|
into "${project.group}".replace(".", "/")
|
|
}
|
|
|
|
publish = true
|
|
override = true
|
|
|
|
pkg {
|
|
repo = "InsanusMokrassar"
|
|
name = "${project.name}"
|
|
vcsUrl = "https://git.insanusmokrassar.com/InsanusMokrassar/SDI.git"
|
|
licenses = ["Apache-2.0"]
|
|
version {
|
|
name = "${project.version}"
|
|
released = new Date()
|
|
vcsTag = "${project.version}"
|
|
gpg {
|
|
sign = true
|
|
passphrase = project.hasProperty('signing.gnupg.passphrase') ? project.property('signing.gnupg.passphrase') : System.getenv('signing.gnupg.passphrase')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
bintrayUpload.doFirst {
|
|
publications = publishing.publications.collect {
|
|
if (it.name.contains('kotlinMultiplatform')) {
|
|
null
|
|
} else {
|
|
it.name
|
|
}
|
|
} - null
|
|
}
|
|
|
|
bintrayUpload.dependsOn publishToMavenLocal |