apply plugin: 'com.jfrog.bintray' version = libraryVersion task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier = 'sources' } task javadoc(type: Javadoc) { source = android.sourceSets.main.java.srcDirs classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) failOnError false options.encoding "UTF-8" options.charSet 'UTF-8' options.author true options.version true options.links javaDocUrl } task javadocJar(type: Jar, dependsOn: javadoc) { classifier = 'javadoc' from javadoc.destinationDir } task copyDoc(type: Copy) { from "${buildDir}/docs/" into "docs" } task copyJar(type: Copy) { from "${buildDir}/libs/" into "libs" } artifacts { archives javadocJar archives sourcesJar } Properties properties = new Properties() try { properties.load(project.rootProject.file('local.properties').newDataInputStream()) } catch (FileNotFoundException ignore) { } bintray { user = properties.getProperty("bintray.user") key = properties.getProperty("bintray.apikey") configurations = ['archives'] pkg { repo = bintrayRepo name = bintrayName desc = libraryDescription websiteUrl = siteUrl vcsUrl = gitUrl licenses = allLicenses publish = true publicDownloadNumbers = true version { desc = libraryDescription } } }