1 apply plugin: 'java' 2 3 archivesBaseName = 'support-v13' 4 5 sourceSets { 6 main.java.srcDir 'java' 7 ics.java.srcDir 'ics' 8 icsmr1.java.srcDir 'ics-mr1' 9 k.java.srcDir 'k' 10 } 11 12 dependencies { 13 icsCompile getAndroidPrebuilt('14') 14 15 icsmr1Compile getAndroidPrebuilt('15') 16 17 kCompile getAndroidPrebuilt('current') 18 19 // order is important as we need the API 13 before the API 4 so that it uses the latest one. 20 compile getAndroidPrebuilt('13') 21 compile project(':v4') 22 compile sourceSets.ics.output 23 compile sourceSets.icsmr1.output 24 compile sourceSets.k.output 25 } 26 27 jar { 28 from sourceSets.ics.output 29 from sourceSets.icsmr1.output 30 from sourceSets.k.output 31 } 32 33 uploadArchives { 34 repositories { 35 mavenDeployer { 36 37 repository(url: uri(project.parent.ext.androidRepoOut)) { 38 } 39 40 pom.project { 41 name 'Android Support Library v13' 42 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. Compatible on devices running API 13 or later." 43 url 'http://developer.android.com/tools/extras/support-library.html' 44 inceptionYear '2011' 45 46 licenses { 47 license { 48 name 'The Apache Software License, Version 2.0' 49 url 'http://www.apache.org/licenses/LICENSE-2.0.txt' 50 distribution 'repo' 51 } 52 } 53 54 scm { 55 url "http://source.android.com" 56 connection "scm:git:https://android.googlesource.com/platform/frameworks/support" 57 } 58 developers { 59 developer { 60 name 'The Android Open Source Project' 61 } 62 } 63 } 64 } 65 } 66 } 67 68 // configuration for the javadoc to include all source sets. 69 javadoc { 70 source sourceSets.main.allJava 71 source sourceSets.ics.allJava 72 source sourceSets.icsmr1.allJava 73 source sourceSets.k.allJava 74 } 75 76 // custom tasks for creating source/javadoc jars 77 task sourcesJar(type: Jar, dependsOn:classes) { 78 classifier = 'sources' 79 from sourceSets.main.allSource 80 from sourceSets.ics.allSource 81 from sourceSets.icsmr1.allSource 82 from sourceSets.k.allSource 83 } 84 85 task javadocJar(type: Jar, dependsOn:javadoc) { 86 classifier 'javadoc' 87 from javadoc.destinationDir 88 } 89 90 // add javadoc/source jar tasks as artifacts 91 artifacts { 92 archives jar 93 archives sourcesJar 94 archives javadocJar 95 } 96