blob: 1751bb15c5f21639bc13a706f858e072e97a54b2 [file] [log] [blame]
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -08001apply plugin: 'java'
2
3archivesBaseName = 'support-v4'
4
5sourceSets {
6 main.java.srcDir 'java'
7 eclair.java.srcDir 'eclair'
Raphael Moll5057daa2013-10-29 17:01:14 -07008 eclairmr1.java.srcDir 'eclair-mr1'
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -08009 froyo.java.srcDir 'froyo'
10 gingerbread.java.srcDir 'gingerbread'
11 honeycomb.java.srcDir 'honeycomb'
12 honeycombmr2.java.srcDir 'honeycomb_mr2'
13 ics.java.srcDir 'ics'
14 icsmr1.java.srcDir 'ics-mr1'
15 jellybean.java.srcDir 'jellybean'
16 jellybeanmr1.java.srcDir 'jellybean-mr1'
17 jellybeanmr2.java.srcDir 'jellybean-mr2'
Alan Viverette5df122f2013-09-23 10:44:38 -070018 kitkat.java.srcDir 'kitkat'
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080019}
20
21dependencies {
22 eclairCompile getAndroidPrebuilt('5')
Raphael Moll5057daa2013-10-29 17:01:14 -070023 eclairmr1Compile getAndroidPrebuilt('7')
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080024 froyoCompile getAndroidPrebuilt('8')
25 gingerbreadCompile getAndroidPrebuilt('9')
26 honeycombCompile getAndroidPrebuilt('11')
27 honeycombmr2Compile getAndroidPrebuilt('13')
28 icsCompile getAndroidPrebuilt('14')
29 icsmr1Compile getAndroidPrebuilt('15')
30 jellybeanCompile getAndroidPrebuilt('16')
31 jellybeanmr1Compile getAndroidPrebuilt('17')
Alan Viverette5df122f2013-09-23 10:44:38 -070032 jellybeanmr2Compile getAndroidPrebuilt('18')
Raphael Moll5057daa2013-10-29 17:01:14 -070033 kitkatCompile getAndroidPrebuilt('19')
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080034
35 compile getAndroidPrebuilt('4')
36 compile sourceSets.eclair.output
Raphael Moll5057daa2013-10-29 17:01:14 -070037 compile sourceSets.eclairmr1.output
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080038 compile sourceSets.froyo.output
39 compile sourceSets.gingerbread.output
40 compile sourceSets.honeycomb.output
41 compile sourceSets.honeycombmr2.output
42 compile sourceSets.ics.output
43 compile sourceSets.icsmr1.output
44 compile sourceSets.jellybean.output
45 compile sourceSets.jellybeanmr1.output
46 compile sourceSets.jellybeanmr2.output
Alan Viverette5df122f2013-09-23 10:44:38 -070047 compile sourceSets.kitkat.output
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080048}
49
50
51jar {
52 from sourceSets.eclair.output
Raphael Moll5057daa2013-10-29 17:01:14 -070053 from sourceSets.eclairmr1.output
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080054 from sourceSets.froyo.output
55 from sourceSets.gingerbread.output
56 from sourceSets.honeycomb.output
57 from sourceSets.honeycombmr2.output
58 from sourceSets.ics.output
59 from sourceSets.icsmr1.output
60 from sourceSets.jellybean.output
61 from sourceSets.jellybeanmr1.output
62 from sourceSets.jellybeanmr2.output
Alan Viverette5df122f2013-09-23 10:44:38 -070063 from sourceSets.kitkat.output
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080064}
65
66uploadArchives {
67 repositories {
68 mavenDeployer {
69 repository(url: uri(project.parent.ext.androidRepoOut)) {
70 }
71
72 pom.project {
73 name 'Android Support Library v4'
74 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."
75 url 'http://developer.android.com/tools/extras/support-library.html'
76 inceptionYear '2011'
77
78 licenses {
79 license {
80 name 'The Apache Software License, Version 2.0'
81 url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
82 distribution 'repo'
83 }
84 }
85
86 scm {
87 url "http://source.android.com"
88 connection "scm:git:https://android.googlesource.com/platform/frameworks/support"
89 }
90 developers {
91 developer {
92 name 'The Android Open Source Project'
93 }
94 }
95 }
96 }
97 }
98}
99
100// configuration for the javadoc to include all source sets.
101javadoc {
102 source sourceSets.main.allJava
103 source sourceSets.eclair.allJava
Raphael Moll5057daa2013-10-29 17:01:14 -0700104 source sourceSets.eclairmr1.allJava
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -0800105 source sourceSets.froyo.allJava
106 source sourceSets.gingerbread.allJava
107 source sourceSets.honeycomb.allJava
108 source sourceSets.honeycombmr2.allJava
109 source sourceSets.ics.allJava
110 source sourceSets.icsmr1.allJava
111 source sourceSets.jellybean.allJava
112 source sourceSets.jellybeanmr1.allJava
Alan Viverette5df122f2013-09-23 10:44:38 -0700113 source sourceSets.jellybeanmr2.allJava
114 source sourceSets.kitkat.allJava
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -0800115}
116
117// custom tasks for creating source/javadoc jars
118task sourcesJar(type: Jar, dependsOn:classes) {
119 classifier = 'sources'
120 from sourceSets.main.allSource
121 from sourceSets.eclair.allSource
Raphael Moll5057daa2013-10-29 17:01:14 -0700122 from sourceSets.eclairmr1.allSource
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -0800123 from sourceSets.froyo.allSource
124 from sourceSets.gingerbread.allSource
125 from sourceSets.honeycomb.allSource
126 from sourceSets.honeycombmr2.allSource
127 from sourceSets.ics.allSource
128 from sourceSets.icsmr1.allSource
129 from sourceSets.jellybean.allSource
130 from sourceSets.jellybeanmr1.allSource
Alan Viverette5df122f2013-09-23 10:44:38 -0700131 from sourceSets.jellybeanmr2.allSource
132 from sourceSets.kitkat.allSource
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -0800133}
134
135task javadocJar(type: Jar, dependsOn:javadoc) {
136 classifier 'javadoc'
137 from javadoc.destinationDir
138}
139
140// add javadoc/source jar tasks as artifacts
141artifacts {
142 archives jar
143 archives sourcesJar
144 archives javadocJar
145}