Xavier Ducrohet | 86fb8ef | 2013-02-22 15:04:37 -0800 | [diff] [blame^] | 1 | apply plugin: 'java' |
| 2 | |
| 3 | archivesBaseName = 'support-v4' |
| 4 | |
| 5 | sourceSets { |
| 6 | main.java.srcDir 'java' |
| 7 | eclair.java.srcDir 'eclair' |
| 8 | froyo.java.srcDir 'froyo' |
| 9 | gingerbread.java.srcDir 'gingerbread' |
| 10 | honeycomb.java.srcDir 'honeycomb' |
| 11 | honeycombmr2.java.srcDir 'honeycomb_mr2' |
| 12 | ics.java.srcDir 'ics' |
| 13 | icsmr1.java.srcDir 'ics-mr1' |
| 14 | jellybean.java.srcDir 'jellybean' |
| 15 | jellybeanmr1.java.srcDir 'jellybean-mr1' |
| 16 | jellybeanmr2.java.srcDir 'jellybean-mr2' |
| 17 | } |
| 18 | |
| 19 | dependencies { |
| 20 | eclairCompile getAndroidPrebuilt('5') |
| 21 | froyoCompile getAndroidPrebuilt('8') |
| 22 | gingerbreadCompile getAndroidPrebuilt('9') |
| 23 | honeycombCompile getAndroidPrebuilt('11') |
| 24 | honeycombmr2Compile getAndroidPrebuilt('13') |
| 25 | icsCompile getAndroidPrebuilt('14') |
| 26 | icsmr1Compile getAndroidPrebuilt('15') |
| 27 | jellybeanCompile getAndroidPrebuilt('16') |
| 28 | jellybeanmr1Compile getAndroidPrebuilt('17') |
| 29 | jellybeanmr2Compile getAndroidPrebuilt('current') |
| 30 | |
| 31 | compile getAndroidPrebuilt('4') |
| 32 | compile sourceSets.eclair.output |
| 33 | compile sourceSets.froyo.output |
| 34 | compile sourceSets.gingerbread.output |
| 35 | compile sourceSets.honeycomb.output |
| 36 | compile sourceSets.honeycombmr2.output |
| 37 | compile sourceSets.ics.output |
| 38 | compile sourceSets.icsmr1.output |
| 39 | compile sourceSets.jellybean.output |
| 40 | compile sourceSets.jellybeanmr1.output |
| 41 | compile sourceSets.jellybeanmr2.output |
| 42 | } |
| 43 | |
| 44 | |
| 45 | jar { |
| 46 | from sourceSets.eclair.output |
| 47 | from sourceSets.froyo.output |
| 48 | from sourceSets.gingerbread.output |
| 49 | from sourceSets.honeycomb.output |
| 50 | from sourceSets.honeycombmr2.output |
| 51 | from sourceSets.ics.output |
| 52 | from sourceSets.icsmr1.output |
| 53 | from sourceSets.jellybean.output |
| 54 | from sourceSets.jellybeanmr1.output |
| 55 | from sourceSets.jellybeanmr2.output |
| 56 | } |
| 57 | |
| 58 | uploadArchives { |
| 59 | repositories { |
| 60 | mavenDeployer { |
| 61 | repository(url: uri(project.parent.ext.androidRepoOut)) { |
| 62 | } |
| 63 | |
| 64 | pom.project { |
| 65 | name 'Android Support Library v4' |
| 66 | 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 4 or later." |
| 67 | url 'http://developer.android.com/tools/extras/support-library.html' |
| 68 | inceptionYear '2011' |
| 69 | |
| 70 | licenses { |
| 71 | license { |
| 72 | name 'The Apache Software License, Version 2.0' |
| 73 | url 'http://www.apache.org/licenses/LICENSE-2.0.txt' |
| 74 | distribution 'repo' |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | scm { |
| 79 | url "http://source.android.com" |
| 80 | connection "scm:git:https://android.googlesource.com/platform/frameworks/support" |
| 81 | } |
| 82 | developers { |
| 83 | developer { |
| 84 | name 'The Android Open Source Project' |
| 85 | } |
| 86 | } |
| 87 | } |
| 88 | } |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | // configuration for the javadoc to include all source sets. |
| 93 | javadoc { |
| 94 | source sourceSets.main.allJava |
| 95 | source sourceSets.eclair.allJava |
| 96 | source sourceSets.froyo.allJava |
| 97 | source sourceSets.gingerbread.allJava |
| 98 | source sourceSets.honeycomb.allJava |
| 99 | source sourceSets.honeycombmr2.allJava |
| 100 | source sourceSets.ics.allJava |
| 101 | source sourceSets.icsmr1.allJava |
| 102 | source sourceSets.jellybean.allJava |
| 103 | source sourceSets.jellybeanmr1.allJava |
| 104 | } |
| 105 | |
| 106 | // custom tasks for creating source/javadoc jars |
| 107 | task sourcesJar(type: Jar, dependsOn:classes) { |
| 108 | classifier = 'sources' |
| 109 | from sourceSets.main.allSource |
| 110 | from sourceSets.eclair.allSource |
| 111 | from sourceSets.froyo.allSource |
| 112 | from sourceSets.gingerbread.allSource |
| 113 | from sourceSets.honeycomb.allSource |
| 114 | from sourceSets.honeycombmr2.allSource |
| 115 | from sourceSets.ics.allSource |
| 116 | from sourceSets.icsmr1.allSource |
| 117 | from sourceSets.jellybean.allSource |
| 118 | from sourceSets.jellybeanmr1.allSource |
| 119 | } |
| 120 | |
| 121 | task javadocJar(type: Jar, dependsOn:javadoc) { |
| 122 | classifier 'javadoc' |
| 123 | from javadoc.destinationDir |
| 124 | } |
| 125 | |
| 126 | // add javadoc/source jar tasks as artifacts |
| 127 | artifacts { |
| 128 | archives jar |
| 129 | archives sourcesJar |
| 130 | archives javadocJar |
| 131 | } |