Created
November 8, 2016 05:16
-
-
Save henrytao-me/76899b6eb87859936ea6f7008fec4260 to your computer and use it in GitHub Desktop.
This file contains hidden or 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" | |
apply plugin: "maven-publish" | |
version = project.ext.bintray.libraryVersion | |
task sourcesJar(type: Jar) { | |
from sourceSets.main.java.srcDirs | |
classifier = "sources" | |
} | |
task javadocJar(type: Jar, dependsOn: javadoc) { | |
classifier = "javadoc" | |
from javadoc.destinationDir | |
} | |
artifacts { | |
archives javadocJar | |
archives sourcesJar | |
} | |
// Bintray | |
Properties properties = new Properties() | |
properties.load(project.rootProject.file("local.properties").newDataInputStream()) | |
publishing { | |
publications { | |
MyPublication(MavenPublication) { | |
from components.java | |
groupId project.ext.bintray.publishedGroupId | |
artifactId project.ext.bintray.artifact | |
} | |
} | |
} | |
bintray { | |
user = properties.getProperty("bintray.user") | |
key = properties.getProperty("bintray.apikey") | |
configurations = ["archives"] | |
publications = ['MyPublication'] | |
pkg { | |
repo = project.ext.bintray.bintrayRepo | |
name = project.ext.bintray.bintrayName | |
desc = project.ext.bintray.libraryDescription | |
websiteUrl = project.ext.bintray.siteUrl | |
vcsUrl = project.ext.bintray.gitUrl | |
licenses = project.ext.bintray.allLicenses | |
publish = true | |
publicDownloadNumbers = true | |
userOrg = properties.getProperty("bintray.userOrg") | |
version { | |
desc = project.ext.bintray.libraryDescription | |
gpg { | |
sign = true //Determines whether to GPG sign the files. The default is false | |
passphrase = properties.getProperty("bintray.gpg.password") //Optional. The passphrase for GPG signing | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment