Last active
February 21, 2017 05:21
-
-
Save jmsalcido/4a556b8bed7dd95ad5acf466d9017c07 to your computer and use it in GitHub Desktop.
bintraygradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.jfrog.bintray' | |
version = '1.0' | |
if (project.hasProperty("android")) { | |
// deploy aar | |
task sourcesJar(type: Jar) { | |
classifier = 'sources' | |
from android.sourceSets.main.java.srcDirs | |
} | |
task javadoc(type: Javadoc) { | |
source = android.sourceSets.main.java.srcDirs | |
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | |
} | |
} else { | |
// deploy jars only | |
task sourcesJar(type: Jar, dependsOn: classes) { | |
classifier = 'sources' | |
from sourceSets.main.allSource | |
} | |
} | |
task javadocJar(type: Jar, dependsOn: javadoc) { | |
classifier = 'javadoc' | |
from javadoc.destinationDir | |
} | |
artifacts { | |
archives javadocJar | |
archives sourcesJar | |
} | |
// Bintray | |
bintray { | |
user = 'jsalcido' | |
key = 'YOUR_KEY' | |
configurations = ['archives'] | |
pkg { | |
repo = 'maven' | |
name = 'simplelogger' | |
desc = 'sample description' | |
websiteUrl = 'http://nearsoft.com' | |
vcsUrl = 'https://github.com/jmsalcido/android_samples.git' | |
licenses = ["MIT"] | |
publish = true | |
publicDownloadNumbers = true | |
version { | |
desc = 'sample description' | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment