blob: ce3f28d3e169503f8331c3f3755fbd867d0c9743 [file] [log] [blame]
Yigit Boyar02a9e8c2016-01-26 20:41:00 -08001apply plugin: 'com.android.library'
Xavier Ducrohet9cfef192014-06-17 11:58:53 -07002archivesBaseName = 'cardview-v7'
3
Aurimas Liutikasd2c60292016-03-02 18:18:53 -08004dependencies {
5 compile project(':support-annotations')
6}
7
Xavier Ducrohet9cfef192014-06-17 11:58:53 -07008android {
Yigit Boyar02a9e8c2016-01-26 20:41:00 -08009 compileSdkVersion project.ext.currentSdk
Xavier Ducrohet9cfef192014-06-17 11:58:53 -070010
Xavier Ducrohet9cfef192014-06-17 11:58:53 -070011 defaultConfig {
Kirill Grouchnikovdf153992016-05-04 16:55:20 -040012 minSdkVersion 9
Yigit Boyar02a9e8c2016-01-26 20:41:00 -080013 }
14
Xavier Ducrohet9cfef192014-06-17 11:58:53 -070015 sourceSets {
16 main.manifest.srcFile 'AndroidManifest.xml'
Alan Viverette9439d702016-10-25 14:45:10 +010017 main.java.srcDirs = [
18 'base',
19 'gingerbread',
20 'jellybean-mr1',
21 'api21',
22 'src'
23 ]
24 main.res.srcDir 'res'
Xavier Ducrohet9cfef192014-06-17 11:58:53 -070025 }
26
Justin Klaassen68e7adb2016-01-21 12:50:47 -080027 compileOptions {
28 sourceCompatibility JavaVersion.VERSION_1_7
29 targetCompatibility JavaVersion.VERSION_1_7
30 }
Xavier Ducrohet9cfef192014-06-17 11:58:53 -070031}
32
33android.libraryVariants.all { variant ->
34 def name = variant.buildType.name
35
Chris Banes4efd0382015-03-05 20:04:05 +000036 if (name.equals(com.android.builder.core.BuilderConstants.DEBUG)) {
Xavier Ducrohet9cfef192014-06-17 11:58:53 -070037 return; // Skip debug builds.
38 }
39 def suffix = name.capitalize()
40
Xavier Ducrohet9cfef192014-06-17 11:58:53 -070041 def sourcesJarTask = project.tasks.create(name: "sourceJar${suffix}", type: Jar) {
42 classifier = 'sources'
Chris Banes4efd0382015-03-05 20:04:05 +000043 from android.sourceSets.main.java.srcDirs
Xavier Ducrohet9cfef192014-06-17 11:58:53 -070044 }
45
Xavier Ducrohet9cfef192014-06-17 11:58:53 -070046 artifacts.add('archives', sourcesJarTask);
47}
48
49uploadArchives {
50 repositories {
51 mavenDeployer {
52 repository(url: uri(rootProject.ext.supportRepoOut)) {
53 }
54
55 pom.project {
56 name 'Android Support CardView v7'
57 description "Android Support CardView v7"
58 url 'http://developer.android.com/tools/extras/support-library.html'
59 inceptionYear '2011'
60
61 licenses {
62 license {
63 name 'The Apache Software License, Version 2.0'
64 url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
65 distribution 'repo'
66 }
67 }
68
69 scm {
70 url "http://source.android.com"
71 connection "scm:git:https://android.googlesource.com/platform/frameworks/support"
72 }
73 developers {
74 developer {
75 name 'The Android Open Source Project'
76 }
77 }
78 }
79 }
80 }
81}