1apply plugin: 'java' 2 3archivesBaseName = 'support-annotations' 4 5sourceSets { 6 main.java.srcDir 'src' 7} 8 9jar { 10 from sourceSets.main.output 11} 12 13uploadArchives { 14 repositories { 15 mavenDeployer { 16 17 repository(url: uri(rootProject.ext.supportRepoOut)) { 18 } 19 20 pom.project { 21 name 'Android Support Library Annotations' 22 description "The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs." 23 url 'http://developer.android.com/tools/extras/support-library.html' 24 inceptionYear '2013' 25 26 licenses { 27 license { 28 name 'The Apache Software License, Version 2.0' 29 url 'http://www.apache.org/licenses/LICENSE-2.0.txt' 30 distribution 'repo' 31 } 32 } 33 34 scm { 35 url "http://source.android.com" 36 connection "scm:git:https://android.googlesource.com/platform/frameworks/support" 37 } 38 developers { 39 developer { 40 name 'The Android Open Source Project' 41 } 42 } 43 } 44 } 45 } 46} 47 48// configuration for the javadoc to include all source sets. 49javadoc { 50 source sourceSets.main.allJava 51} 52 53// custom tasks for creating source/javadoc jars 54task sourcesJar(type: Jar, dependsOn:classes) { 55 classifier = 'sources' 56 from sourceSets.main.allSource 57} 58 59task javadocJar(type: Jar, dependsOn:javadoc) { 60 classifier 'javadoc' 61 from javadoc.destinationDir 62} 63 64// add javadoc/source jar tasks as artifacts 65artifacts { 66 archives jar 67 archives sourcesJar 68 archives javadocJar 69} 70