1+ /*
2+ * Gets the version name from the latest Git tag
3+ */
4+ def getVersionName = { ->
5+ try {
6+ def stdout = new ByteArrayOutputStream ()
7+ exec {
8+ commandLine ' git' , ' describe' , ' --tags'
9+ standardOutput = stdout
10+ }
11+ return stdout. toString(). trim()
12+ }
13+ catch (ignored) {
14+ return version;
15+ }
16+ }
117/*
218 * The MIT License (MIT)
319 * Copyright (c) 2017 Sybit GmbH
@@ -24,7 +40,7 @@ apply plugin: 'maven-publish'
2440apply plugin : ' com.jfrog.bintray'
2541
2642group = ' com.sybit'
27- version = ' 0.1 '
43+ version = getVersionName()
2844
2945description = """ com.sybit airtable"""
3046
@@ -63,7 +79,6 @@ dependencies {
6379 codacy group : ' com.codacy' , name : ' codacy-coverage-reporter' , version : ' 1.0.13'
6480}
6581
66-
6782/*
6883 * Gets the version name from the latest Git tag
6984 */
@@ -128,17 +143,21 @@ bintray {
128143 user = project. hasProperty(' bintrayUser' ) ? project. property(' bintrayUser' ) : System . getenv(' BINTRAY_USER' )
129144 key = project. hasProperty(' bintrayApiKey' ) ? project. property(' bintrayApiKey' ) : System . getenv(' BINTRAY_API_KEY' )
130145
131- publications = [' mavenJava' ]
146+ // publications = ['mavenJava']
147+ configurations = [' archives' ]
132148
133149 dryRun = false // Whether to run this as dry-run, without deploying
134150 publish = true // If version should be auto published after an upload
135- version getVersionName()
151+
136152 pkg {
137153 repo = ' maven'
138154 userOrg = ' sybit-education'
139155 name = ' airtable.java'
140156 licenses = [' MIT License' ]
141157 vcsUrl = ' https://github.com/Sybit-Education/airtable.java.git'
142-
158+ version {
159+ name = getVersionName()
160+ released = new Date ()
161+ }
143162 }
144163}
0 commit comments