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