summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Linzner <slinzner@google.com>2016-02-12 17:45:28 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-02-12 17:45:28 +0000
commita709a95955a35b023c4f57e2e825b81bd13617fb (patch)
treea688e3c3f14dbdbd5f81b545dad2922f4636b50c
parent20b215734ff1964013caa19e3c9aa44f3922611f (diff)
parentf605da3d9e6590351cb0bb26bb6ba5146952777c (diff)
downloadvolley-a709a95955a35b023c4f57e2e825b81bd13617fb.tar.gz
Merge "Adding Bintray configuration for jCenter hosting"
am: f605da3d9e * commit 'f605da3d9e6590351cb0bb26bb6ba5146952777c': Adding Bintray configuration for jCenter hosting
-rw-r--r--bintray.gradle87
-rw-r--r--build.gradle1
2 files changed, 88 insertions, 0 deletions
diff --git a/bintray.gradle b/bintray.gradle
new file mode 100644
index 0000000..37a5e68
--- /dev/null
+++ b/bintray.gradle
@@ -0,0 +1,87 @@
+buildscript {
+ repositories {
+ jcenter()
+ }
+ dependencies {
+ classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2"
+ }
+}
+
+// apply the plugin with its class name rather than its Id to work around gradle limitation of
+// not being able to find the plugin by Id despite the dependencies being added right above. Gradle
+// is currently not capable of loading plugins by Id if the dependency is anywhere else than
+// in the main project build.gradle. This file is "imported" into the project's build.gradle
+// through a "apply from:".
+apply plugin: com.jfrog.bintray.gradle.BintrayPlugin
+apply plugin: 'maven-publish'
+
+project.ext.group = 'com.android.volley'
+project.ext.archivesBaseName = 'volley'
+project.ext.version = '1.0.0'
+project.ext.pomDesc = 'Volley Android library'
+
+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))
+}
+
+task javadocJar(type: Jar, dependsOn: javadoc) {
+ classifier = 'javadoc'
+ from javadoc.destinationDir
+}
+
+artifacts {
+ archives javadocJar
+ archives sourcesJar
+}
+
+publishing {
+ publications {
+ library(MavenPublication) {
+ groupId project.ext.group
+ artifactId project.ext.archivesBaseName
+ version project.ext.version
+
+ // Release AAR, Sources, and JavaDoc
+ artifact "$buildDir/outputs/aar/volley-release.aar"
+ artifact sourcesJar
+ artifact javadocJar
+ }
+ }
+}
+
+bintray {
+ user = System.env.BINTRAY_USER
+ key = System.env.BINTRAY_USER_KEY
+
+ publications = [ 'library' ]
+
+ publish = project.has("release")
+ pkg {
+ userOrg = 'android'
+ repo = 'android-utils'
+ group = project.ext.group
+ name = project.ext.group + '.' + project.ext.archivesBaseName
+ desc = project.ext.pomDesc
+ licenses = [ 'Apache-2.0' ]
+ websiteUrl = 'https://tools.android.com'
+ issueTrackerUrl = 'https://code.google.com/p/android/'
+ vcsUrl = 'https://android.googlesource.com/platform/frameworks/volley.git'
+ labels = ['android', 'volley', 'network']
+ publicDownloadNumbers = true
+
+ version {
+ name = project.ext.version
+ desc = project.ext.pomDesc + ' version ' + project.ext.version
+ gpg {
+ sign = true
+ passphrase = System.env.GPG_PASSPHRASE
+ }
+ }
+ }
+}
diff --git a/build.gradle b/build.gradle
index 9f973c1..855d39a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -35,3 +35,4 @@ android {
}
apply from: 'rules.gradle'
+apply from: 'bintray.gradle'