Yigit Boyar | 02a9e8c | 2016-01-26 20:41:00 -0800 | [diff] [blame] | 1 | apply plugin: 'com.android.library' |
Chris Banes | 95cf116 | 2015-01-13 10:27:15 +0000 | [diff] [blame] | 2 | |
| 3 | archivesBaseName = 'design' |
| 4 | |
| 5 | dependencies { |
Alan Viverette | 9439d70 | 2016-10-25 14:45:10 +0100 | [diff] [blame] | 6 | compile project(':support-v4') |
Chris Banes | 9840efe | 2015-01-06 14:02:01 +0000 | [diff] [blame] | 7 | compile project(':support-appcompat-v7') |
Yuichi Araki | 64bcb67 | 2015-09-03 10:25:04 +0000 | [diff] [blame] | 8 | compile project(':support-recyclerview-v7') |
Aurimas Liutikas | 3cc432a | 2016-08-19 11:16:37 -0700 | [diff] [blame] | 9 | compile project(':support-transition') |
Kirill Grouchnikov | 394c427 | 2015-12-21 14:09:23 -0500 | [diff] [blame] | 10 | |
Aurimas Liutikas | dfe7578 | 2016-08-03 14:27:20 -0700 | [diff] [blame] | 11 | androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") { |
Chris Banes | f6c82b6 | 2016-01-13 16:38:59 +0000 | [diff] [blame] | 12 | exclude module: 'support-annotations' |
| 13 | } |
Aurimas Liutikas | dfe7578 | 2016-08-03 14:27:20 -0700 | [diff] [blame] | 14 | androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") { |
Chris Banes | f6c82b6 | 2016-01-13 16:38:59 +0000 | [diff] [blame] | 15 | exclude module: 'support-annotations' |
| 16 | } |
Chris Banes | 907eab4 | 2016-11-21 12:52:14 +0000 | [diff] [blame] | 17 | androidTestCompile ("com.android.support.test.espresso:espresso-contrib:${project.rootProject.ext.espressoVersion}") { |
| 18 | exclude group: 'com.android.support' |
| 19 | } |
Kirill Grouchnikov | 8cf1dce | 2016-02-02 11:03:42 -0500 | [diff] [blame] | 20 | androidTestCompile 'org.mockito:mockito-core:1.9.5' |
Kirill Grouchnikov | a9f4a78 | 2016-02-03 11:37:47 -0500 | [diff] [blame] | 21 | androidTestCompile 'com.google.dexmaker:dexmaker:1.2' |
| 22 | androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2' |
Kirill Grouchnikov | 394c427 | 2015-12-21 14:09:23 -0500 | [diff] [blame] | 23 | testCompile 'junit:junit:4.12' |
Aurimas Liutikas | 480ee20 | 2016-10-21 10:12:53 -0700 | [diff] [blame] | 24 | testCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") { |
| 25 | exclude module: 'support-annotations' |
| 26 | } |
Chris Banes | 95cf116 | 2015-01-13 10:27:15 +0000 | [diff] [blame] | 27 | } |
| 28 | |
| 29 | android { |
Yigit Boyar | 02a9e8c | 2016-01-26 20:41:00 -0800 | [diff] [blame] | 30 | compileSdkVersion project.ext.currentSdk |
Chris Banes | 95cf116 | 2015-01-13 10:27:15 +0000 | [diff] [blame] | 31 | |
Kirill Grouchnikov | 394c427 | 2015-12-21 14:09:23 -0500 | [diff] [blame] | 32 | defaultConfig { |
Kirill Grouchnikov | df15399 | 2016-05-04 16:55:20 -0400 | [diff] [blame] | 33 | minSdkVersion 9 |
Kirill Grouchnikov | 394c427 | 2015-12-21 14:09:23 -0500 | [diff] [blame] | 34 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
Alan Viverette | eb64862 | 2016-03-11 19:33:03 +0000 | [diff] [blame] | 35 | // This disables the builds tools automatic vector -> PNG generation |
| 36 | generatedDensities = [] |
Kirill Grouchnikov | 394c427 | 2015-12-21 14:09:23 -0500 | [diff] [blame] | 37 | } |
| 38 | |
Chris Banes | 95cf116 | 2015-01-13 10:27:15 +0000 | [diff] [blame] | 39 | sourceSets { |
| 40 | main.manifest.srcFile 'AndroidManifest.xml' |
Alan Viverette | 9439d70 | 2016-10-25 14:45:10 +0100 | [diff] [blame] | 41 | main.java.srcDirs = [ |
| 42 | 'base', |
| 43 | 'gingerbread', |
| 44 | 'honeycomb', |
| 45 | 'honeycomb-mr1', |
| 46 | 'ics', |
| 47 | 'lollipop', |
| 48 | 'src' |
| 49 | ] |
| 50 | main.res.srcDirs = [ |
| 51 | 'res', |
| 52 | 'res-public' |
| 53 | ] |
Chris Banes | 95cf116 | 2015-01-13 10:27:15 +0000 | [diff] [blame] | 54 | main.resources.srcDir 'src' |
| 55 | |
Chris Banes | 95cf116 | 2015-01-13 10:27:15 +0000 | [diff] [blame] | 56 | androidTest.setRoot('tests') |
| 57 | androidTest.java.srcDir 'tests/src' |
Kirill Grouchnikov | 394c427 | 2015-12-21 14:09:23 -0500 | [diff] [blame] | 58 | androidTest.res.srcDir 'tests/res' |
| 59 | androidTest.manifest.srcFile 'tests/AndroidManifest.xml' |
Chris Banes | a2f4dd0 | 2016-06-21 14:41:43 +0100 | [diff] [blame] | 60 | |
| 61 | test.java.srcDir 'jvm-tests/src' |
Chris Banes | 95cf116 | 2015-01-13 10:27:15 +0000 | [diff] [blame] | 62 | } |
| 63 | |
| 64 | compileOptions { |
| 65 | sourceCompatibility JavaVersion.VERSION_1_7 |
| 66 | targetCompatibility JavaVersion.VERSION_1_7 |
| 67 | } |
| 68 | |
Yuichi Araki | e764a03 | 2015-06-30 18:45:49 +0900 | [diff] [blame] | 69 | buildTypes.all { |
| 70 | consumerProguardFiles 'proguard-rules.pro' |
| 71 | } |
Alan Viverette | eb64862 | 2016-03-11 19:33:03 +0000 | [diff] [blame] | 72 | |
| 73 | aaptOptions { |
| 74 | additionalParameters "--no-version-vectors" |
| 75 | } |
Chris Banes | 95cf116 | 2015-01-13 10:27:15 +0000 | [diff] [blame] | 76 | } |
Chris Banes | 3f175da | 2015-10-01 12:42:26 +0100 | [diff] [blame] | 77 | |
| 78 | android.libraryVariants.all { variant -> |
| 79 | def name = variant.buildType.name |
| 80 | |
| 81 | if (name.equals(com.android.builder.core.BuilderConstants.DEBUG)) { |
| 82 | return; // Skip debug builds. |
| 83 | } |
| 84 | def suffix = name.capitalize() |
| 85 | |
Chris Banes | 3f175da | 2015-10-01 12:42:26 +0100 | [diff] [blame] | 86 | def sourcesJarTask = project.tasks.create(name: "sourceJar${suffix}", type: Jar) { |
| 87 | classifier = 'sources' |
| 88 | from android.sourceSets.main.java.srcDirs |
| 89 | } |
| 90 | |
Chris Banes | 3f175da | 2015-10-01 12:42:26 +0100 | [diff] [blame] | 91 | artifacts.add('archives', sourcesJarTask); |
| 92 | } |
| 93 | |
| 94 | uploadArchives { |
| 95 | repositories { |
| 96 | mavenDeployer { |
| 97 | repository(url: uri(rootProject.ext.supportRepoOut)) { |
| 98 | } |
| 99 | |
| 100 | pom.project { |
| 101 | name 'Android Design Support Library' |
| 102 | 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." |
| 103 | url 'http://developer.android.com/tools/extras/support-library.html' |
| 104 | inceptionYear '2011' |
| 105 | |
| 106 | licenses { |
| 107 | license { |
| 108 | name 'The Apache Software License, Version 2.0' |
| 109 | url 'http://www.apache.org/licenses/LICENSE-2.0.txt' |
| 110 | distribution 'repo' |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | scm { |
| 115 | url "http://source.android.com" |
| 116 | connection "scm:git:https://android.googlesource.com/platform/frameworks/support" |
| 117 | } |
| 118 | developers { |
| 119 | developer { |
| 120 | name 'The Android Open Source Project' |
| 121 | } |
| 122 | } |
| 123 | } |
| 124 | } |
| 125 | } |
| 126 | } |