blob: 5e1a026c5236f1357e6ad896bc8cbddaac339142 [file] [log] [blame]
Yigit Boyar02a9e8c2016-01-26 20:41:00 -08001apply plugin: 'com.android.library'
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -08002archivesBaseName = 'support-v13'
3
Alan Viverette9439d702016-10-25 14:45:10 +01004dependencies {
5 compile project(':support-annotations')
6 compile project(':support-v4')
7}
Justin Klaassen68e7adb2016-01-21 12:50:47 -08008
Yigit Boyar5932b6f2014-04-30 13:43:59 -07009android {
Alan Viverette9439d702016-10-25 14:45:10 +010010 compileSdkVersion project.ext.currentSdk
Yigit Boyar5932b6f2014-04-30 13:43:59 -070011
12 defaultConfig {
13 minSdkVersion 13
Yigit Boyar5932b6f2014-04-30 13:43:59 -070014 }
15
Yigit Boyar5932b6f2014-04-30 13:43:59 -070016 sourceSets {
17 main.manifest.srcFile 'AndroidManifest.xml'
Alan Viverette9439d702016-10-25 14:45:10 +010018 main.java.srcDirs = [
19 'ics',
20 'ics-mr1',
21 'api23',
22 'api24',
23 'api25',
24 'java'
25 ]
Justin Klaassen68e7adb2016-01-21 12:50:47 -080026 }
27
Yigit Boyar5932b6f2014-04-30 13:43:59 -070028 lintOptions {
29 // TODO: fix errors and reenable.
30 abortOnError false
31 }
Yigit Boyar02a9e8c2016-01-26 20:41:00 -080032
33 compileOptions {
34 sourceCompatibility JavaVersion.VERSION_1_7
35 targetCompatibility JavaVersion.VERSION_1_7
36 }
Yigit Boyar5932b6f2014-04-30 13:43:59 -070037}
38
39android.libraryVariants.all { variant ->
Yigit Boyar5932b6f2014-04-30 13:43:59 -070040 def name = variant.buildType.name
41
Chris Banes4efd0382015-03-05 20:04:05 +000042 if (name.equals(com.android.builder.core.BuilderConstants.DEBUG)) {
Yigit Boyar5932b6f2014-04-30 13:43:59 -070043 return; // Skip debug builds.
44 }
45 def suffix = name.capitalize()
46
47 def jarTask = project.tasks.create(name: "jar${suffix}", type: Jar){
48 dependsOn variant.javaCompile
49 from variant.javaCompile.destinationDir
50 from 'LICENSE.txt'
51 }
52 def javadocTask = project.tasks.create(name: "javadoc${suffix}", type: Javadoc) {
Chris Banes4efd0382015-03-05 20:04:05 +000053 source android.sourceSets.main.java
Yigit Boyar5932b6f2014-04-30 13:43:59 -070054 classpath = files(variant.javaCompile.classpath.files) + files(
Chris Banes4efd0382015-03-05 20:04:05 +000055 "${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar")
Yigit Boyar5932b6f2014-04-30 13:43:59 -070056 }
57
58 def javadocJarTask = project.tasks.create(name: "javadocJar${suffix}", type: Jar) {
59 classifier = 'javadoc'
60 from 'build/docs/javadoc'
61 }
62
63 def sourcesJarTask = project.tasks.create(name: "sourceJar${suffix}", type: Jar) {
64 classifier = 'sources'
Chris Banes4efd0382015-03-05 20:04:05 +000065 from android.sourceSets.main.java.srcDirs
Yigit Boyar5932b6f2014-04-30 13:43:59 -070066 }
67
Yigit Boyar5932b6f2014-04-30 13:43:59 -070068 artifacts.add('archives', javadocJarTask);
69 artifacts.add('archives', sourcesJarTask);
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080070}
71
72uploadArchives {
73 repositories {
74 mavenDeployer {
75
Xavier Ducrohet855a9222014-01-02 19:00:43 -080076 repository(url: uri(rootProject.ext.supportRepoOut)) {
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080077 }
78
79 pom.project {
80 name 'Android Support Library v13'
81 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."
82 url 'http://developer.android.com/tools/extras/support-library.html'
83 inceptionYear '2011'
84
85 licenses {
86 license {
87 name 'The Apache Software License, Version 2.0'
88 url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
89 distribution 'repo'
90 }
91 }
92
93 scm {
94 url "http://source.android.com"
95 connection "scm:git:https://android.googlesource.com/platform/frameworks/support"
96 }
97 developers {
98 developer {
99 name 'The Android Open Source Project'
100 }
101 }
102 }
103 }
104 }
105}