Publish android library to bintray (jcenter).
In you project's build.gradle
, inside the buildscript -> dependencies add:
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:$latest_version"
classpath "com.github.dcendents:android-maven-gradle-plugin:$latest_version"
In your project's local.properties
:
bintray.user=$user_name
bintray.apikey=$api_key
bintray.gpg.password=$password
In your library module's build.gradle
, add:
ext {
bintrayRepo = "$repo_name"
bintrayName = "$package_name"
publishedGroupId = "$group_id"
artifact = "$artifact_id"
libraryName = "$library_name"
libraryDescription = "$library_description"
libraryVersion = "$library_version"
gitUrl = "$git_url"
siteUrl = "$site_url"
issuesUrl = "$issues_url"
licenseName = "Apache License 2.0"
licenseUrl = "http://www.apache.org/licenses/LICENSE-2.0.txt"
allLicenses = ["Apache-2.0"]
}
In your library module's build.gradle
, add:
apply from: "https://raw.githubusercontent.com/dmitriykhalturin/bintray-gradle-config/master/bintray.gradle"
Or you can copy the bintray.gradle
file into your library module's root directory, and apply from it by add:
apply from: "bintray.gradle"
Just run:
./gradlew clean install bintrayUpload
in your project root path.
- Hong Duan for DrawableToolbox library and
bintray.gradle
.