11import com.smokejumperit.gradle.report.DependencyLicensePlugin
22
3+ /*
4+ * Gets the version name from the latest Git tag
5+ */
6+ def getVersionName = { ->
7+ try {
8+ def stdout = new ByteArrayOutputStream ()
9+ exec {
10+ commandLine ' git' , ' describe' , ' --tags'
11+ standardOutput = stdout
12+ }
13+ return stdout. toString(). trim()
14+ }
15+ catch (ignored) {
16+ return version;
17+ }
18+ }
319/*
420 * The MIT License (MIT)
521 * Copyright (c) 2017 Sybit GmbH
@@ -27,7 +43,7 @@ apply plugin: 'com.jfrog.bintray'
2743apply plugin : DependencyLicensePlugin
2844
2945group = ' com.sybit'
30- version = ' 0.1 '
46+ version = getVersionName()
3147
3248description = """ com.sybit airtable"""
3349
@@ -67,23 +83,6 @@ dependencies {
6783}
6884
6985
70- /*
71- * Gets the version name from the latest Git tag
72- */
73- def getVersionName = { ->
74- try {
75- def stdout = new ByteArrayOutputStream ()
76- exec {
77- commandLine ' git' , ' describe' , ' --tags'
78- standardOutput = stdout
79- }
80- return stdout. toString(). trim()
81- }
82- catch (ignored) {
83- return version;
84- }
85- }
86-
8786// custom tasks for creating source/javadoc jars
8887task sourcesJar (type : Jar , dependsOn : classes) {
8988 classifier = ' sources'
@@ -130,17 +129,21 @@ bintray {
130129 user = project. hasProperty(' bintrayUser' ) ? project. property(' bintrayUser' ) : System . getenv(' BINTRAY_USER' )
131130 key = project. hasProperty(' bintrayApiKey' ) ? project. property(' bintrayApiKey' ) : System . getenv(' BINTRAY_API_KEY' )
132131
133- publications = [' mavenJava' ]
132+ // publications = ['mavenJava']
133+ configurations = [' archives' ]
134134
135135 dryRun = false // Whether to run this as dry-run, without deploying
136136 publish = true // If version should be auto published after an upload
137- version getVersionName()
137+
138138 pkg {
139139 repo = ' maven'
140140 userOrg = ' sybit-education'
141141 name = ' airtable.java'
142142 licenses = [' MIT License' ]
143143 vcsUrl = ' https://github.com/Sybit-Education/airtable.java.git'
144-
144+ version {
145+ name = getVersionName()
146+ released = new Date ()
147+ }
145148 }
146149}
0 commit comments