1buildscript { 2 repositories { 3 jcenter() 4 } 5 dependencies { 6 classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2" 7 } 8} 9 10// apply the plugin with its class name rather than its Id to work around gradle limitation of 11// not being able to find the plugin by Id despite the dependencies being added right above. Gradle 12// is currently not capable of loading plugins by Id if the dependency is anywhere else than 13// in the main project build.gradle. This file is "imported" into the project's build.gradle 14// through a "apply from:". 15apply plugin: com.jfrog.bintray.gradle.BintrayPlugin 16apply plugin: 'maven-publish' 17 18project.ext.group = 'com.android.volley' 19project.ext.archivesBaseName = 'volley' 20project.ext.version = '1.0.0' 21project.ext.pomDesc = 'Volley Android library' 22 23task sourcesJar(type: Jar) { 24 classifier = 'sources' 25 from android.sourceSets.main.java.srcDirs 26} 27 28task javadoc(type: Javadoc) { 29 source = android.sourceSets.main.java.srcDirs 30 classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) 31} 32 33task javadocJar(type: Jar, dependsOn: javadoc) { 34 classifier = 'javadoc' 35 from javadoc.destinationDir 36} 37 38artifacts { 39 archives javadocJar 40 archives sourcesJar 41} 42 43publishing { 44 publications { 45 library(MavenPublication) { 46 groupId project.ext.group 47 artifactId project.ext.archivesBaseName 48 version project.ext.version 49 50 // Release AAR, Sources, and JavaDoc 51 artifact "$buildDir/outputs/aar/volley-release.aar" 52 artifact sourcesJar 53 artifact javadocJar 54 } 55 } 56} 57 58bintray { 59 user = System.env.BINTRAY_USER 60 key = System.env.BINTRAY_USER_KEY 61 62 publications = [ 'library' ] 63 64 publish = project.hasProperty("release") 65 pkg { 66 userOrg = 'android' 67 repo = 'android-utils' 68 group = project.ext.group 69 name = project.ext.group + '.' + project.ext.archivesBaseName 70 desc = project.ext.pomDesc 71 licenses = [ 'Apache-2.0' ] 72 websiteUrl = 'https://tools.android.com' 73 issueTrackerUrl = 'https://code.google.com/p/android/' 74 vcsUrl = 'https://android.googlesource.com/platform/frameworks/volley.git' 75 labels = ['android', 'volley', 'network'] 76 publicDownloadNumbers = true 77 78 version { 79 name = project.ext.version 80 desc = project.ext.pomDesc + ' version ' + project.ext.version 81 gpg { 82 sign = true 83 passphrase = System.env.GPG_PASSPHRASE 84 } 85 } 86 } 87} 88