diff --git a/sources/build.gradle b/sources/build.gradle index 29f1d679..e27bf382 100644 --- a/sources/build.gradle +++ b/sources/build.gradle @@ -9,6 +9,7 @@ buildscript { } } +apply plugin: 'java' apply plugin: 'maven' apply plugin: 'eclipse' apply plugin: 'signing' @@ -17,48 +18,9 @@ apply plugin: 'maven-publish' group = 'com.ullink.slack' archivesBaseName = 'simpleslackapi' -version = '0.5.1-SNAPSHOT' +version = '0.5.1' -publishing { - publications { - mavenJava(MavenPublication) { - from components.java - artifact sourcesJar - artifact javadocJar - pom.withXml { - asNode().appendNode('description', 'A simple API to build bot running on Slack') - asNode().children().last() + pomConfig - } - } - } -} - - -task copyRuntimeLibs(type: Copy) { - into "lib" - from configurations.runtime -} - -task javadocJar(type: Jar) { - classifier = 'javadoc' - from javadoc -} - -task sourcesJar(type: Jar) { - classifier = 'sources' - from sourceSets.main.allSource -} - -artifacts { - archives javadocJar, sourcesJar -} - -signing { - required false - sign configurations.archives -} - def pomConfig = { name 'Simple Slack API' url 'https://github.com/Ullink/simple-slack-api' @@ -131,6 +93,46 @@ def pomConfig = { } } + +publishing { + publications { + mavenJava(MavenPublication) { + from components.java + artifact sourcesJar + artifact javadocJar + pom.withXml { + asNode().appendNode('description', 'A simple API to build bot running on Slack') + asNode().children().last() + pomConfig + } + } + } +} + + +task copyRuntimeLibs(type: Copy) { + into "lib" + from configurations.runtime +} + +task javadocJar(type: Jar) { + classifier = 'javadoc' + from javadoc +} + +task sourcesJar(type: Jar) { + classifier = 'sources' + from sourceSets.main.allSource +} + +artifacts { + archives javadocJar, sourcesJar +} + +signing { + required false + sign configurations.archives +} + bintray { if (this.hasProperty('bintray_user')) { user = bintray_user //this usually comes from gradle.properties file in ~/.gradle