blob: e262ec77949f7670875d6c6b45b113b9c834c444 [file] [log] [blame]
Yigit Boyar02a9e8c2016-01-26 20:41:00 -08001apply plugin: 'com.android.library'
Jaekyun Seokd2f102c2014-04-14 09:26:11 +09002archivesBaseName = 'recyclerview-v7'
3
4dependencies {
Yigit Boyarffff7c92014-10-08 17:24:29 -07005 compile project(':support-annotations')
Kirill Grouchnikov55fc3f22016-05-12 12:17:09 -07006 compile project(':support-compat')
7 compile project(':support-core-ui')
Aurimas Liutikasdfe75782016-08-03 14:27:20 -07008 androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
Yigit Boyar999c3972015-12-29 17:37:37 -08009 exclude module: 'support-annotations'
10 }
Aurimas Liutikasdfe75782016-08-03 14:27:20 -070011 androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") {
Yigit Boyar999c3972015-12-29 17:37:37 -080012 exclude module: 'support-annotations'
13 }
Yigit Boyarbe7a54a2015-04-07 13:23:50 -070014 testCompile 'junit:junit:4.12'
Yigit Boyara41c1742016-07-08 18:28:20 -070015 testCompile "org.mockito:mockito-core:1.9.5"
Aurimas Liutikas480ee202016-10-21 10:12:53 -070016 testCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
17 exclude module: 'support-annotations'
18 }
Yigit Boyar999c3972015-12-29 17:37:37 -080019 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 Seokd2f102c2014-04-14 09:26:11 +090022}
23
24android {
Aurimas Liutikase8d41202016-11-15 09:31:05 -080025 compileSdkVersion project.ext.currentSdk
Jaekyun Seokd2f102c2014-04-14 09:26:11 +090026
Xavier Ducrohet9acddc72014-05-28 22:20:01 -070027 defaultConfig {
Kirill Grouchnikovdf153992016-05-04 16:55:20 -040028 minSdkVersion 9
Yigit Boyarbe7a54a2015-04-07 13:23:50 -070029 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Xavier Ducrohet9acddc72014-05-28 22:20:01 -070030 }
31
Jaekyun Seokd2f102c2014-04-14 09:26:11 +090032 sourceSets {
33 main.manifest.srcFile 'AndroidManifest.xml'
34 main.java.srcDir 'src'
Deepanshu Gupta281e1192016-01-18 22:07:58 -080035 main.res.srcDirs 'res', 'res-public'
Deepanshu Gupta0194ed82015-04-15 16:40:02 -070036
Yigit Boyaredc25dd2014-04-23 15:40:36 -070037 androidTest.setRoot('tests')
Yigit Boyara41c1742016-07-08 18:28:20 -070038 test.java.srcDir 'jvm-tests/src'
Yigit Boyaredc25dd2014-04-23 15:40:36 -070039 androidTest.java.srcDir 'tests/src'
Deepanshu Gupta0194ed82015-04-15 16:40:02 -070040 androidTest.res.srcDir 'tests/res'
41 androidTest.manifest.srcFile 'tests/AndroidManifest.xml'
Jaekyun Seokd2f102c2014-04-14 09:26:11 +090042 }
43
Yigit Boyar02a9e8c2016-01-26 20:41:00 -080044 compileOptions {
45 sourceCompatibility JavaVersion.VERSION_1_7
46 targetCompatibility JavaVersion.VERSION_1_7
47 }
48
Yigit Boyarbe7a54a2015-04-07 13:23:50 -070049 testOptions {
50 unitTests.returnDefaultValues = true
51 }
Yigit Boyar9c2c2702015-12-28 14:55:35 -080052
53 buildTypes.all {
54 consumerProguardFiles 'proguard-rules.pro'
55 }
Xavier Ducrohet9acddc72014-05-28 22:20:01 -070056}
57
58android.libraryVariants.all { variant ->
59 def name = variant.buildType.name
60
Chris Banes6a4c14b2015-03-05 20:04:05 +000061 if (name.equals(com.android.builder.core.BuilderConstants.DEBUG)) {
Xavier Ducrohet9acddc72014-05-28 22:20:01 -070062 return; // Skip debug builds.
63 }
64 def suffix = name.capitalize()
65
Xavier Ducrohet9acddc72014-05-28 22:20:01 -070066 def sourcesJarTask = project.tasks.create(name: "sourceJar${suffix}", type: Jar) {
67 classifier = 'sources'
Chris Banes6a4c14b2015-03-05 20:04:05 +000068 from android.sourceSets.main.java.srcDirs
Xavier Ducrohet9acddc72014-05-28 22:20:01 -070069 }
70
Xavier Ducrohet9acddc72014-05-28 22:20:01 -070071 artifacts.add('archives', sourcesJarTask);
72}
73
74uploadArchives {
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}