blob: 694d7672fa4cd9b80649daeef37299faa819e5eb [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')
Vladislav Kaznacheev8a771cd2016-11-15 13:22:38 -08007
8 androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
9 exclude module: 'support-annotations'
10 }
11 androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") {
12 exclude module: 'support-annotations'
13 }
14 androidTestCompile "org.mockito:mockito-core:1.9.5"
15 androidTestCompile "com.google.dexmaker:dexmaker:1.2"
16 androidTestCompile "com.google.dexmaker:dexmaker-mockito:1.2"
Alan Viverette9439d702016-10-25 14:45:10 +010017}
Justin Klaassen68e7adb2016-01-21 12:50:47 -080018
Yigit Boyar5932b6f2014-04-30 13:43:59 -070019android {
Alan Viverette9439d702016-10-25 14:45:10 +010020 compileSdkVersion project.ext.currentSdk
Yigit Boyar5932b6f2014-04-30 13:43:59 -070021
22 defaultConfig {
23 minSdkVersion 13
Vladislav Kaznacheev8a771cd2016-11-15 13:22:38 -080024 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Yigit Boyar5932b6f2014-04-30 13:43:59 -070025 }
26
Yigit Boyar5932b6f2014-04-30 13:43:59 -070027 sourceSets {
28 main.manifest.srcFile 'AndroidManifest.xml'
Alan Viverette9439d702016-10-25 14:45:10 +010029 main.java.srcDirs = [
30 'ics',
31 'ics-mr1',
32 'api23',
33 'api24',
34 'api25',
35 'java'
36 ]
Vladislav Kaznacheev8a771cd2016-11-15 13:22:38 -080037
38 androidTest.setRoot('tests')
39 androidTest.java.srcDir 'tests/java'
40 androidTest.res.srcDir 'tests/res'
41 androidTest.manifest.srcFile 'tests/AndroidManifest.xml'
Justin Klaassen68e7adb2016-01-21 12:50:47 -080042 }
43
Yigit Boyar5932b6f2014-04-30 13:43:59 -070044 lintOptions {
45 // TODO: fix errors and reenable.
46 abortOnError false
47 }
Yigit Boyar02a9e8c2016-01-26 20:41:00 -080048
49 compileOptions {
50 sourceCompatibility JavaVersion.VERSION_1_7
51 targetCompatibility JavaVersion.VERSION_1_7
52 }
Yigit Boyar5932b6f2014-04-30 13:43:59 -070053}
54
55android.libraryVariants.all { variant ->
Yigit Boyar5932b6f2014-04-30 13:43:59 -070056 def name = variant.buildType.name
57
Chris Banes4efd0382015-03-05 20:04:05 +000058 if (name.equals(com.android.builder.core.BuilderConstants.DEBUG)) {
Yigit Boyar5932b6f2014-04-30 13:43:59 -070059 return; // Skip debug builds.
60 }
61 def suffix = name.capitalize()
62
63 def jarTask = project.tasks.create(name: "jar${suffix}", type: Jar){
64 dependsOn variant.javaCompile
65 from variant.javaCompile.destinationDir
66 from 'LICENSE.txt'
67 }
68 def javadocTask = project.tasks.create(name: "javadoc${suffix}", type: Javadoc) {
Chris Banes4efd0382015-03-05 20:04:05 +000069 source android.sourceSets.main.java
Yigit Boyar5932b6f2014-04-30 13:43:59 -070070 classpath = files(variant.javaCompile.classpath.files) + files(
Chris Banes4efd0382015-03-05 20:04:05 +000071 "${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar")
Yigit Boyar5932b6f2014-04-30 13:43:59 -070072 }
73
74 def javadocJarTask = project.tasks.create(name: "javadocJar${suffix}", type: Jar) {
75 classifier = 'javadoc'
76 from 'build/docs/javadoc'
77 }
78
79 def sourcesJarTask = project.tasks.create(name: "sourceJar${suffix}", type: Jar) {
80 classifier = 'sources'
Chris Banes4efd0382015-03-05 20:04:05 +000081 from android.sourceSets.main.java.srcDirs
Yigit Boyar5932b6f2014-04-30 13:43:59 -070082 }
83
Yigit Boyar5932b6f2014-04-30 13:43:59 -070084 artifacts.add('archives', javadocJarTask);
85 artifacts.add('archives', sourcesJarTask);
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080086}
87
88uploadArchives {
89 repositories {
90 mavenDeployer {
91
Xavier Ducrohet855a9222014-01-02 19:00:43 -080092 repository(url: uri(rootProject.ext.supportRepoOut)) {
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080093 }
94
95 pom.project {
96 name 'Android Support Library v13'
97 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."
98 url 'http://developer.android.com/tools/extras/support-library.html'
99 inceptionYear '2011'
100
101 licenses {
102 license {
103 name 'The Apache Software License, Version 2.0'
104 url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
105 distribution 'repo'
106 }
107 }
108
109 scm {
110 url "http://source.android.com"
111 connection "scm:git:https://android.googlesource.com/platform/frameworks/support"
112 }
113 developers {
114 developer {
115 name 'The Android Open Source Project'
116 }
117 }
118 }
119 }
120 }
121}