I\'m trying to upload a android library module from android studio, followed by this blog: https://inthecheesefactory.com/blog/how-to-upload-library-to-jcenter-maven-central
I would like to add more to @gba's answer here
Instead of directly including your bintray username and apikey, you should include them in local.properties file at root of your project. The local.properties file is by default added to .gitignore and hence not uploaded to githup with other files. It helps in keeping your username and apikey safe.
bintray.user=
bintray.apikey=
Then in your module gradle file add:
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
configurations = ['archives']
pkg {
repo = "maven"
name = ""
websiteUrl =
vcsUrl = gitUrl
licenses = ["Apache-2.0"]
publish = true
}
}
Reference: https://www.virag.si/2015/01/publishing-gradle-android-library-to-jcenter/