How to distribute Android library in a convenient way

compile ''
repositories {

First: Create your account on JFrog Bintray

Second: Create your new repository

Add a new package
buildscript {
repositories {
dependencies {
classpath ''
// Two necessary plugins
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
bintray.apikey=your_apikey //Go to your profile page on bintray homepage
bintray.gpg.password=your_gpg_passphrase //Remember when you generated gpg key.
ext {

//For bintray and jcenter distribution
bintrayRepo = 'maven'
bintrayName = 'sample-library'

publishedGroupId = 'com.example.sample'
libraryName = 'SampleLibrary'
artifact = 'sample-library' //This artifact name should be the same with library module name

libraryDescription = 'Simple, clean and short description'

siteUrl = ''
gitUrl = ''

libraryVersion = '1.0.0'

developerId = 'your_id'
developerName = 'your_name'
developerEmail = 'your_email'
organization = 'your_organization' // if you push to organization's repository.
licenseName = 'The Apache Software License, Version 2.0' //Example for license
licenseUrl = ''
allLicenses = ["Apache-2.0"]

//These two remote files contain Bintray configuration as described above.
apply from: ''
apply from: ''
maven {
url ""

Software engineer and designer, currently building digital scent technology at Side project:

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store