Fast uploading artifacts to Bintray
If you have bintray
account and you want to publish artifacts into it, simply add this code to
your project.
// it's important to put this on top of your gradle.build
plugins {
id "com.jfrog.bintray" version "1.7.3"
}
// ...
ext {
bintrayConfig = [
// map of parameters that are described below
]
}
apply from: "https://raw.githubusercontent.com/magx2/magx2.github.io/bintray.gradle-1.1.0/commons/gradle/bintray.gradle"
Below I’ve put parameters to configure artifact publishing
Parameter Name | Required? | Default | Type | Example |
---|---|---|---|---|
user | false | bintrayUser from project or BINTRAY_USER from env |
String |
magx2 |
key | false | bintrayKey from project or BINTRAY_KEY from env |
String |
3ea11156f5c80g752dfc701ab35213225gdf0e59 |
publications | false | [‘BintrayProjectPublication’] | List<String> |
[‘BintrayProjectPublication’] |
repo | true | N/A | String |
bigboy |
groupId | false | project.group from java plugin |
String |
pl.grzeslowski |
name | false | project.name |
String |
jSupla |
userOrg | true | N/A | String |
bigboy |
desc | false | project.description |
String |
This is my test project |
websiteUrl | true | N/A | String |
https://github.com/magx2/jSupla |
issueTrackerUrl | true | N/A | String |
https://github.com/magx2/jSupla/issues |
vcsUrl | true | N/A | String |
https://github.com/magx2/jSupla.git |
licenses | true | N/A | String |
‘MIT’ |
labels | false | [] | String |
[‘Supla’, ‘IoT’] |
publicDownloadNumbers | false | true | List<String> |
true |
githubRepo | true | N/A | String |
magx2/jSupla |
githubReleaseNotesFile | false | README.md |
String |
RELEASE_NOTES.md |
versionName | false | project.version from java plugin. Note: -SNAPSHOT suffix will be removed |
String |
1.0.0-SNAPSHOT |
versionVcsTag | false | "v" + versionName |
String |
v1.0.0 |
passphrase | false | ${project.name}Passphrase |
String |
DYnn7gUh6pjFRwE3RZw4 |
Example:
bintrayConfig = [
repo : "bigboy",
userOrg : "big-boy",
websiteUrl : "https://github.com/magx2/jSupla",
issueTrackerUrl: "https://github.com/magx2/jSupla/issues",
vcsUrl : "https://github.com/magx2/jSupla.git",
licenses : ['MIT'],
labels : ['Supla', "ioT"],
githubRepo : "magx2/jSupla",
]
Last but not least: run ./gradle2 clean bintrayUpload
Written on October 27, 2017