Yigit Boyar | 02a9e8c | 2016-01-26 20:41:00 -0800 | [diff] [blame] | 1 | apply plugin: 'com.android.library' |
Xavier Ducrohet | 86fb8ef | 2013-02-22 15:04:37 -0800 | [diff] [blame] | 2 | archivesBaseName = 'support-v13' |
| 3 | |
Alan Viverette | 9439d70 | 2016-10-25 14:45:10 +0100 | [diff] [blame] | 4 | dependencies { |
| 5 | compile project(':support-annotations') |
| 6 | compile project(':support-v4') |
Vladislav Kaznacheev | 8a771cd | 2016-11-15 13:22:38 -0800 | [diff] [blame] | 7 | |
| 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 Viverette | 9439d70 | 2016-10-25 14:45:10 +0100 | [diff] [blame] | 17 | } |
Justin Klaassen | 68e7adb | 2016-01-21 12:50:47 -0800 | [diff] [blame] | 18 | |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 19 | android { |
Alan Viverette | 9439d70 | 2016-10-25 14:45:10 +0100 | [diff] [blame] | 20 | compileSdkVersion project.ext.currentSdk |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 21 | |
| 22 | defaultConfig { |
| 23 | minSdkVersion 13 |
Vladislav Kaznacheev | 8a771cd | 2016-11-15 13:22:38 -0800 | [diff] [blame] | 24 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 25 | } |
| 26 | |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 27 | sourceSets { |
| 28 | main.manifest.srcFile 'AndroidManifest.xml' |
Alan Viverette | 9439d70 | 2016-10-25 14:45:10 +0100 | [diff] [blame] | 29 | main.java.srcDirs = [ |
| 30 | 'ics', |
| 31 | 'ics-mr1', |
| 32 | 'api23', |
| 33 | 'api24', |
| 34 | 'api25', |
| 35 | 'java' |
| 36 | ] |
Vladislav Kaznacheev | 8a771cd | 2016-11-15 13:22:38 -0800 | [diff] [blame] | 37 | |
| 38 | androidTest.setRoot('tests') |
| 39 | androidTest.java.srcDir 'tests/java' |
| 40 | androidTest.res.srcDir 'tests/res' |
| 41 | androidTest.manifest.srcFile 'tests/AndroidManifest.xml' |
Justin Klaassen | 68e7adb | 2016-01-21 12:50:47 -0800 | [diff] [blame] | 42 | } |
| 43 | |
Yigit Boyar | 02a9e8c | 2016-01-26 20:41:00 -0800 | [diff] [blame] | 44 | compileOptions { |
| 45 | sourceCompatibility JavaVersion.VERSION_1_7 |
| 46 | targetCompatibility JavaVersion.VERSION_1_7 |
| 47 | } |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | android.libraryVariants.all { variant -> |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 51 | def name = variant.buildType.name |
| 52 | |
Chris Banes | 4efd038 | 2015-03-05 20:04:05 +0000 | [diff] [blame] | 53 | if (name.equals(com.android.builder.core.BuilderConstants.DEBUG)) { |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 54 | return; // Skip debug builds. |
| 55 | } |
| 56 | def suffix = name.capitalize() |
| 57 | |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 58 | def sourcesJarTask = project.tasks.create(name: "sourceJar${suffix}", type: Jar) { |
| 59 | classifier = 'sources' |
Chris Banes | 4efd038 | 2015-03-05 20:04:05 +0000 | [diff] [blame] | 60 | from android.sourceSets.main.java.srcDirs |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 61 | } |
| 62 | |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 63 | artifacts.add('archives', sourcesJarTask); |
Xavier Ducrohet | 86fb8ef | 2013-02-22 15:04:37 -0800 | [diff] [blame] | 64 | } |
| 65 | |
| 66 | uploadArchives { |
| 67 | repositories { |
| 68 | mavenDeployer { |
| 69 | |
Xavier Ducrohet | 855a922 | 2014-01-02 19:00:43 -0800 | [diff] [blame] | 70 | repository(url: uri(rootProject.ext.supportRepoOut)) { |
Xavier Ducrohet | 86fb8ef | 2013-02-22 15:04:37 -0800 | [diff] [blame] | 71 | } |
| 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 | } |