Yigit Boyar | 02a9e8c | 2016-01-26 20:41:00 -0800 | [diff] [blame] | 1 | apply plugin: 'com.android.library' |
Jaekyun Seok | d2f102c | 2014-04-14 09:26:11 +0900 | [diff] [blame] | 2 | archivesBaseName = 'recyclerview-v7' |
| 3 | |
| 4 | dependencies { |
Yigit Boyar | ffff7c9 | 2014-10-08 17:24:29 -0700 | [diff] [blame] | 5 | compile project(':support-annotations') |
Kirill Grouchnikov | 55fc3f2 | 2016-05-12 12:17:09 -0700 | [diff] [blame] | 6 | compile project(':support-compat') |
| 7 | compile project(':support-core-ui') |
Aurimas Liutikas | dfe7578 | 2016-08-03 14:27:20 -0700 | [diff] [blame] | 8 | androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") { |
Yigit Boyar | 999c397 | 2015-12-29 17:37:37 -0800 | [diff] [blame] | 9 | exclude module: 'support-annotations' |
| 10 | } |
Aurimas Liutikas | dfe7578 | 2016-08-03 14:27:20 -0700 | [diff] [blame] | 11 | androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") { |
Yigit Boyar | 999c397 | 2015-12-29 17:37:37 -0800 | [diff] [blame] | 12 | exclude module: 'support-annotations' |
| 13 | } |
Yigit Boyar | be7a54a | 2015-04-07 13:23:50 -0700 | [diff] [blame] | 14 | testCompile 'junit:junit:4.12' |
Yigit Boyar | a41c174 | 2016-07-08 18:28:20 -0700 | [diff] [blame] | 15 | testCompile "org.mockito:mockito-core:1.9.5" |
Aurimas Liutikas | 480ee20 | 2016-10-21 10:12:53 -0700 | [diff] [blame] | 16 | testCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") { |
| 17 | exclude module: 'support-annotations' |
| 18 | } |
Yigit Boyar | 999c397 | 2015-12-29 17:37:37 -0800 | [diff] [blame] | 19 | androidTestCompile "org.mockito:mockito-core:1.9.5" |
| 20 | androidTestCompile "com.google.dexmaker:dexmaker:1.2" |
| 21 | androidTestCompile "com.google.dexmaker:dexmaker-mockito:1.2" |
Jaekyun Seok | d2f102c | 2014-04-14 09:26:11 +0900 | [diff] [blame] | 22 | } |
| 23 | |
| 24 | android { |
Aurimas Liutikas | e8d4120 | 2016-11-15 09:31:05 -0800 | [diff] [blame] | 25 | compileSdkVersion project.ext.currentSdk |
Jaekyun Seok | d2f102c | 2014-04-14 09:26:11 +0900 | [diff] [blame] | 26 | |
Xavier Ducrohet | 9acddc7 | 2014-05-28 22:20:01 -0700 | [diff] [blame] | 27 | defaultConfig { |
Kirill Grouchnikov | df15399 | 2016-05-04 16:55:20 -0400 | [diff] [blame] | 28 | minSdkVersion 9 |
Yigit Boyar | be7a54a | 2015-04-07 13:23:50 -0700 | [diff] [blame] | 29 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
Xavier Ducrohet | 9acddc7 | 2014-05-28 22:20:01 -0700 | [diff] [blame] | 30 | } |
| 31 | |
Jaekyun Seok | d2f102c | 2014-04-14 09:26:11 +0900 | [diff] [blame] | 32 | sourceSets { |
| 33 | main.manifest.srcFile 'AndroidManifest.xml' |
| 34 | main.java.srcDir 'src' |
Deepanshu Gupta | 281e119 | 2016-01-18 22:07:58 -0800 | [diff] [blame] | 35 | main.res.srcDirs 'res', 'res-public' |
Deepanshu Gupta | 0194ed8 | 2015-04-15 16:40:02 -0700 | [diff] [blame] | 36 | |
Yigit Boyar | edc25dd | 2014-04-23 15:40:36 -0700 | [diff] [blame] | 37 | androidTest.setRoot('tests') |
Yigit Boyar | a41c174 | 2016-07-08 18:28:20 -0700 | [diff] [blame] | 38 | test.java.srcDir 'jvm-tests/src' |
Yigit Boyar | edc25dd | 2014-04-23 15:40:36 -0700 | [diff] [blame] | 39 | androidTest.java.srcDir 'tests/src' |
Deepanshu Gupta | 0194ed8 | 2015-04-15 16:40:02 -0700 | [diff] [blame] | 40 | androidTest.res.srcDir 'tests/res' |
| 41 | androidTest.manifest.srcFile 'tests/AndroidManifest.xml' |
Jaekyun Seok | d2f102c | 2014-04-14 09:26:11 +0900 | [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 | } |
| 48 | |
Yigit Boyar | be7a54a | 2015-04-07 13:23:50 -0700 | [diff] [blame] | 49 | testOptions { |
| 50 | unitTests.returnDefaultValues = true |
| 51 | } |
Yigit Boyar | 9c2c270 | 2015-12-28 14:55:35 -0800 | [diff] [blame] | 52 | |
| 53 | buildTypes.all { |
| 54 | consumerProguardFiles 'proguard-rules.pro' |
| 55 | } |
Xavier Ducrohet | 9acddc7 | 2014-05-28 22:20:01 -0700 | [diff] [blame] | 56 | } |
| 57 | |
| 58 | android.libraryVariants.all { variant -> |
| 59 | def name = variant.buildType.name |
| 60 | |
Chris Banes | 6a4c14b | 2015-03-05 20:04:05 +0000 | [diff] [blame] | 61 | if (name.equals(com.android.builder.core.BuilderConstants.DEBUG)) { |
Xavier Ducrohet | 9acddc7 | 2014-05-28 22:20:01 -0700 | [diff] [blame] | 62 | return; // Skip debug builds. |
| 63 | } |
| 64 | def suffix = name.capitalize() |
| 65 | |
Xavier Ducrohet | 9acddc7 | 2014-05-28 22:20:01 -0700 | [diff] [blame] | 66 | def sourcesJarTask = project.tasks.create(name: "sourceJar${suffix}", type: Jar) { |
| 67 | classifier = 'sources' |
Chris Banes | 6a4c14b | 2015-03-05 20:04:05 +0000 | [diff] [blame] | 68 | from android.sourceSets.main.java.srcDirs |
Xavier Ducrohet | 9acddc7 | 2014-05-28 22:20:01 -0700 | [diff] [blame] | 69 | } |
| 70 | |
Xavier Ducrohet | 9acddc7 | 2014-05-28 22:20:01 -0700 | [diff] [blame] | 71 | artifacts.add('archives', sourcesJarTask); |
| 72 | } |
| 73 | |
| 74 | uploadArchives { |
| 75 | repositories { |
| 76 | mavenDeployer { |
| 77 | repository(url: uri(rootProject.ext.supportRepoOut)) { |
| 78 | } |
| 79 | |
| 80 | pom.project { |
| 81 | name 'Android Support RecyclerView v7' |
| 82 | description "Android Support RecyclerView v7" |
| 83 | url 'http://developer.android.com/tools/extras/support-library.html' |
| 84 | inceptionYear '2011' |
| 85 | |
| 86 | licenses { |
| 87 | license { |
| 88 | name 'The Apache Software License, Version 2.0' |
| 89 | url 'http://www.apache.org/licenses/LICENSE-2.0.txt' |
| 90 | distribution 'repo' |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | scm { |
| 95 | url "http://source.android.com" |
| 96 | connection "scm:git:https://android.googlesource.com/platform/frameworks/support" |
| 97 | } |
| 98 | developers { |
| 99 | developer { |
| 100 | name 'The Android Open Source Project' |
| 101 | } |
| 102 | } |
| 103 | } |
| 104 | } |
| 105 | } |
| 106 | } |