SauceNaoAPI/publish.gradle

55 lines
2.0 KiB
Groovy
Raw Normal View History

2019-02-20 04:06:04 +00:00
apply plugin: 'com.jfrog.bintray'
2020-08-22 17:00:07 +00:00
apply from: "maven.publish.gradle"
2019-02-20 04:06:04 +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')
filesSpec {
2020-08-22 17:00:07 +00:00
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()
}
}
2019-02-20 04:06:04 +00:00
}
2020-08-22 17:00:07 +00:00
into "${project.group}".replace(".", "/")
2019-02-20 04:06:04 +00:00
}
pkg {
2020-08-22 17:00:07 +00:00
repo = "StandardRepository"
2020-08-29 05:46:20 +00:00
name = "${project.name}-mpp"
2019-02-20 04:06:04 +00:00
vcsUrl = "https://github.com/InsanusMokrassar/${project.name}"
2020-08-22 17:00:07 +00:00
licenses = ["Apache-2.0"]
2019-02-20 04:06:04 +00:00
version {
name = "${project.version}"
released = new Date()
2020-08-22 17:00:07 +00:00
vcsTag = "${project.version}"
gpg {
sign = true
passphrase = project.hasProperty('signing.gnupg.passphrase') ? project.property('signing.gnupg.passphrase') : System.getenv('signing.gnupg.passphrase')
}
2019-02-20 04:06:04 +00:00
}
}
}
2020-08-22 17:00:07 +00:00
bintrayUpload.doFirst {
publications = publishing.publications.collect {
if (it.name.contains('kotlinMultiplatform')) {
null
} else {
it.name
}
} - null
}
bintrayUpload.dependsOn publishToMavenLocal