apply plugin: 'com.android.library' apply plugin: 'com.jfrog.bintray' apply plugin: 'maven-publish' android { compileSdkVersion androidCompileSdkVersion defaultConfig { minSdkVersion androidMinSdkVersion targetSdkVersion androidTargetSdkVersion versionCode androidVersionCode versionName androidVersionName } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } //region Publish to jCenter def libGroupId = 'com.mikhaellopez' def libArtifactId = 'circularprogressbar' def libVersion = androidVersionName def libDesc = 'This is an Android project allowing to realize a circular ProgressBar in the simplest way possible.' def libLicenses = ['Apache-2.0'] def libVCSUrl = 'https://github.com/lopspower/CircularProgressBar.git' // Generate Source Jar task sourceJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier "sources" } // Create the publication with the pom configuration publishing { publications { MyPublication(MavenPublication) { groupId libGroupId artifactId libArtifactId version libVersion artifact(sourceJar) artifact("$buildDir/outputs/aar/$libArtifactId-release.aar") } } } // Bintray config Properties properties = new Properties() properties.load(project.rootProject.file('local.properties').newDataInputStream()) bintray { user = properties.getProperty("bintray.user") key = properties.getProperty("bintray.apikey") publications = ['MyPublication'] pkg { repo = "maven" name = "$libGroupId:$libArtifactId" desc = libDesc licenses = libLicenses vcsUrl = libVCSUrl version { name = libVersion vcsTag = libVersion released = new Date() } } } //endregion