Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Commit 56dea95

Browse files
committed
corrected bintray-task
1 parent 385b1dc commit 56dea95

1 file changed

Lines changed: 24 additions & 21 deletions

File tree

build.gradle

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
import 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'
2743
apply plugin: DependencyLicensePlugin
2844

2945
group = 'com.sybit'
30-
version = '0.1'
46+
version = getVersionName()
3147

3248
description = """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
8887
task 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

Comments
 (0)