I recently uploaded a github project to bintray and successfully synchronized it with the JCenter repository. I used this tutorial:
http://inthecheesefactory.com/blog/how-to-upload-library-to-jcenter-maven-central-as-dependency/en
So my gradle dependency:
dependencies {
compile 'com.github.danylo2006:hashtag-helper:1.1.0'
}
To download it, I changed my build.gradle and added the appropriate script world. Everything is as in the textbook.
... some code here
ext {
bintrayRepo = 'maven'
bintrayName = 'hashtag-helper'
publishedGroupId = 'com.github.danylo2006'
libraryName = 'HashTagHelper'
artifact = 'hashtag-helper'
libraryDescription = 'This is a library designed for highlighting hashtags ("#example") and catching click on them.'
siteUrl = 'https://github.com/danylo2006/HashTagHelper'
gitUrl = 'https://github.com/danylo2006/HashTagHelper.git'
libraryVersion = '1.1.0'
developerId = 'danylovolokh'
developerName = 'Danylo Volokh'
developerEmail = 'v.danylo@gmail.com'
licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}
Here is the hard part:
I changed my alias github danylo2006 to danylovolokh and now I want to change the gradle dependency:
dependencies {
compile 'com.github.danylo2006:hashtag-helper:1.1.0'
}
Change to:
dependencies {
compile 'com.github.danylovolokh:hashtag-helper:1.1.0'
}
- I got groupId what I need from Sonatype
- So, I changed my gradle script.
The only relevant change:
publishedGroupId = 'com.github.danylo2006'
Changed to
publishedGroupId = 'com.github.danylovolokh'
:
gradlew
gradlew bintrayUpload
BUILD_SUCCESSFULL
gradle, ": (36, 13) : com.github.danylovolokh: hashtag-helper: 1.1.0"