1 apply plugin: 'com.jfrog.bintray'
3 version = libraryVersion
5 if (project.hasProperty("android")) { // Android libraries
6 task sourcesJar(type: Jar) {
8 from android.sourceSets.main.java.srcDirs
11 // task javadoc(type: Javadoc) {
12 // source = android.sourceSets.main.java.srcDirs
13 // classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
15 } else { // Java libraries
16 task sourcesJar(type: Jar, dependsOn: classes) {
17 classifier = 'sources'
18 from sourceSets.main.allSource
22 //task javadocJar(type: Jar, dependsOn: javadoc) {
23 // classifier = 'javadoc'
24 // from javadoc.destinationDir
33 def propertiesFile = project.rootProject.file('local.properties')
34 if( propertiesFile.exists()) {
35 Properties properties = new Properties()
36 properties.load(propertiesFile.newDataInputStream())
39 user = properties.getProperty("bintray.user")
40 key = properties.getProperty("bintray.apikey")
42 configurations = ['archives']
46 desc = libraryDescription
49 licenses = allLicenses
51 publicDownloadNumbers = true
53 desc = libraryDescription
55 sign = true //Determines whether to GPG sign the files. The default is false
56 passphrase = properties.getProperty("bintray.gpg.password")
57 //Optional. The passphrase for GPG signing'
63 logger.info("local.properties does not exist. Skipping Bintray.")