blob: fb1c25da51534a4edda83efebe984b5b6448c9fa [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 Boyar02a9e8c2016-01-26 20:41:00 -080044 compileOptions {
45 sourceCompatibility JavaVersion.VERSION_1_7
46 targetCompatibility JavaVersion.VERSION_1_7
47 }
Yigit Boyar5932b6f2014-04-30 13:43:59 -070048}
49
50android.libraryVariants.all { variant ->
Yigit Boyar5932b6f2014-04-30 13:43:59 -070051 def name = variant.buildType.name
52
Chris Banes4efd0382015-03-05 20:04:05 +000053 if (name.equals(com.android.builder.core.BuilderConstants.DEBUG)) {
Yigit Boyar5932b6f2014-04-30 13:43:59 -070054 return; // Skip debug builds.
55 }
56 def suffix = name.capitalize()
57
Yigit Boyar5932b6f2014-04-30 13:43:59 -070058 def sourcesJarTask = project.tasks.create(name: "sourceJar${suffix}", type: Jar) {
59 classifier = 'sources'
Chris Banes4efd0382015-03-05 20:04:05 +000060 from android.sourceSets.main.java.srcDirs
Yigit Boyar5932b6f2014-04-30 13:43:59 -070061 }
62
Yigit Boyar5932b6f2014-04-30 13:43:59 -070063 artifacts.add('archives', sourcesJarTask);
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080064}
65
66uploadArchives {
67 repositories {
68 mavenDeployer {
69
Xavier Ducrohet855a9222014-01-02 19:00:43 -080070 repository(url: uri(rootProject.ext.supportRepoOut)) {
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080071 }
72
73 pom.project {
74 name 'Android Support Library v13'
75 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."
76 url 'http://developer.android.com/tools/extras/support-library.html'
77 inceptionYear '2011'
78
79 licenses {
80 license {
81 name 'The Apache Software License, Version 2.0'
82 url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
83 distribution 'repo'
84 }
85 }
86
87 scm {
88 url "http://source.android.com"
89 connection "scm:git:https://android.googlesource.com/platform/frameworks/support"
90 }
91 developers {
92 developer {
93 name 'The Android Open Source Project'
94 }
95 }
96 }
97 }
98 }
99}