Skip to content

Commit

Permalink
Improve publish and upload
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaelz committed Sep 21, 2018
1 parent e399621 commit c395478
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
4 changes: 3 additions & 1 deletion build.gradle
Expand Up @@ -25,7 +25,7 @@ buildscript {

// Global configuration for all Konclik library submodules
def libs = ['native', 'jvm']
configure(subprojects.findAll { libs.contains(it.name) }) {
configure(allprojects.findAll { libs.contains(it.name) }) {
group 'de.dbaelz.konclik'
version '0.5.0'

Expand All @@ -44,6 +44,8 @@ configure(subprojects.findAll { libs.contains(it.name) }) {
groupId project.group
artifactId project.name
version project.version

generatePom(pom)
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions native/build.gradle
Expand Up @@ -5,3 +5,5 @@ components.main {

outputKinds = [KLIBRARY]
}

bintrayUpload.dependsOn publishToMavenLocal
18 changes: 9 additions & 9 deletions publish.gradle
Expand Up @@ -10,18 +10,18 @@ def pomBaseData = {
}
}

afterEvaluate {
project.publishing.publications.forEach { publication ->
publication.pom.withXml {
def root = it.asNode()
root.appendNode('name', project.name)
root.appendNode('description', 'Kotlin/Native Command Line Interface Kit')
root.appendNode('url', 'https://github.com/dbaelz/Konclik')
root.children().last() + pomBaseData
}
def generatePom = { pom ->
pom.withXml {
def root = it.asNode()
root.appendNode('name', project.name)
root.appendNode('description', 'Kotlin/Native Command Line Interface Kit')
root.appendNode('url', 'https://github.com/dbaelz/Konclik')
root.children().last() + pomBaseData
}
}

ext.generatePom = generatePom

bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
Expand Down

0 comments on commit c395478

Please sign in to comment.