blob: 37e66250ee1dde248c1fa3ce3421f2643d31bc7a [file] [log] [blame]
Yigit Boyar02a9e8c2016-01-26 20:41:00 -08001apply plugin: 'com.android.library'
Chris Banes95cf1162015-01-13 10:27:15 +00002
3archivesBaseName = 'design'
4
5dependencies {
Alan Viverette9439d702016-10-25 14:45:10 +01006 compile project(':support-v4')
Chris Banes9840efe2015-01-06 14:02:01 +00007 compile project(':support-appcompat-v7')
Yuichi Araki64bcb672015-09-03 10:25:04 +00008 compile project(':support-recyclerview-v7')
Aurimas Liutikas3cc432a2016-08-19 11:16:37 -07009 compile project(':support-transition')
Kirill Grouchnikov394c4272015-12-21 14:09:23 -050010
Aurimas Liutikasdfe75782016-08-03 14:27:20 -070011 androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
Chris Banesf6c82b62016-01-13 16:38:59 +000012 exclude module: 'support-annotations'
13 }
Aurimas Liutikasdfe75782016-08-03 14:27:20 -070014 androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") {
Chris Banesf6c82b62016-01-13 16:38:59 +000015 exclude module: 'support-annotations'
16 }
Chris Banes907eab42016-11-21 12:52:14 +000017 androidTestCompile ("com.android.support.test.espresso:espresso-contrib:${project.rootProject.ext.espressoVersion}") {
18 exclude group: 'com.android.support'
19 }
Kirill Grouchnikov8cf1dce2016-02-02 11:03:42 -050020 androidTestCompile 'org.mockito:mockito-core:1.9.5'
Kirill Grouchnikova9f4a782016-02-03 11:37:47 -050021 androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
22 androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
Kirill Grouchnikov394c4272015-12-21 14:09:23 -050023 testCompile 'junit:junit:4.12'
Aurimas Liutikas480ee202016-10-21 10:12:53 -070024 testCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
25 exclude module: 'support-annotations'
26 }
Chris Banes95cf1162015-01-13 10:27:15 +000027}
28
29android {
Yigit Boyar02a9e8c2016-01-26 20:41:00 -080030 compileSdkVersion project.ext.currentSdk
Chris Banes95cf1162015-01-13 10:27:15 +000031
Kirill Grouchnikov394c4272015-12-21 14:09:23 -050032 defaultConfig {
Kirill Grouchnikovdf153992016-05-04 16:55:20 -040033 minSdkVersion 9
Kirill Grouchnikov394c4272015-12-21 14:09:23 -050034 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Alan Viveretteeb648622016-03-11 19:33:03 +000035 // This disables the builds tools automatic vector -> PNG generation
36 generatedDensities = []
Kirill Grouchnikov394c4272015-12-21 14:09:23 -050037 }
38
Chris Banes95cf1162015-01-13 10:27:15 +000039 sourceSets {
40 main.manifest.srcFile 'AndroidManifest.xml'
Alan Viverette9439d702016-10-25 14:45:10 +010041 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 Banes95cf1162015-01-13 10:27:15 +000054 main.resources.srcDir 'src'
55
Chris Banes95cf1162015-01-13 10:27:15 +000056 androidTest.setRoot('tests')
57 androidTest.java.srcDir 'tests/src'
Kirill Grouchnikov394c4272015-12-21 14:09:23 -050058 androidTest.res.srcDir 'tests/res'
59 androidTest.manifest.srcFile 'tests/AndroidManifest.xml'
Chris Banesa2f4dd02016-06-21 14:41:43 +010060
61 test.java.srcDir 'jvm-tests/src'
Chris Banes95cf1162015-01-13 10:27:15 +000062 }
63
64 compileOptions {
65 sourceCompatibility JavaVersion.VERSION_1_7
66 targetCompatibility JavaVersion.VERSION_1_7
67 }
68
Yuichi Arakie764a032015-06-30 18:45:49 +090069 buildTypes.all {
70 consumerProguardFiles 'proguard-rules.pro'
71 }
Alan Viveretteeb648622016-03-11 19:33:03 +000072
73 aaptOptions {
74 additionalParameters "--no-version-vectors"
75 }
Chris Banes95cf1162015-01-13 10:27:15 +000076}
Chris Banes3f175da2015-10-01 12:42:26 +010077
78android.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 Banes3f175da2015-10-01 12:42:26 +010086 def sourcesJarTask = project.tasks.create(name: "sourceJar${suffix}", type: Jar) {
87 classifier = 'sources'
88 from android.sourceSets.main.java.srcDirs
89 }
90
Chris Banes3f175da2015-10-01 12:42:26 +010091 artifacts.add('archives', sourcesJarTask);
92}
93
94uploadArchives {
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}