From 2e53872c320279b57b09e98a95bdd9bc85855847 Mon Sep 17 00:00:00 2001 From: grimrose Date: Fri, 11 Jul 2014 00:28:56 +0900 Subject: [PATCH] Add bintray publish task --- build.gradle | 5 ++++ gradle/bintray.gradle | 50 +++++++++++++++++++++++++++++++++++++++ gradle/buildscript.gradle | 6 +++++ 3 files changed, 61 insertions(+) create mode 100644 gradle/bintray.gradle create mode 100644 gradle/buildscript.gradle diff --git a/build.gradle b/build.gradle index 3673d8c..2b98695 100644 --- a/build.gradle +++ b/build.gradle @@ -139,3 +139,8 @@ class StopWatch { } } +/* bintray */ +buildscript { + apply from: file('gradle/buildscript.gradle'), to: buildscript +} +apply from: file('gradle/bintray.gradle') diff --git a/gradle/bintray.gradle b/gradle/bintray.gradle new file mode 100644 index 0000000..b37daa7 --- /dev/null +++ b/gradle/bintray.gradle @@ -0,0 +1,50 @@ +apply plugin: 'maven-publish' + +task sourceJar(type: Jar) { + classifier = 'sources' + from sourceSets.main.allSource +} + +task groovydocJar(type: Jar) { + classifier = 'javadoc' + from groovydoc +} + +artifacts { + archives sourceJar + archives groovydocJar +} + +publishing { + publications { + deployment(MavenPublication) { + from components.java + + artifact sourceJar + artifact groovydocJar + } + } +} + +apply plugin: 'com.jfrog.bintray' + +bintray { + user = project.hasProperty('bintrayUser') ? project.getProperty('bintrayUser') : null + key = project.hasProperty('bintrayKey') ? project.getProperty('bintrayKey') : null + publications = ['deployment'] + pkg { + repo = 'maven' + name = 'gexcelapi' + desc = 'GExcelAPI is a thin wrapper library powered by Groovy of Apache POI, not JExcelAPI.' + websiteUrl = 'https://github.com/nobeans/gexcelapi' + issueTrackerUrl = 'https://github.com/nobeans/gexcelapi/issues' + vcsUrl = 'https://github.com/nobeans/gexcelapi.git' + licenses = ['Apache-2.0'] + version { + name = "${version}" + vcsTag = "v${version}" + } + } +} + +bintrayUpload.dependsOn build diff --git a/gradle/buildscript.gradle b/gradle/buildscript.gradle new file mode 100644 index 0000000..4253bbb --- /dev/null +++ b/gradle/buildscript.gradle @@ -0,0 +1,6 @@ +repositories { + jcenter() +} +dependencies { + classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:0.5" +}