blob: 2f47f83a23c6fc7183b38eb16548abe1589c38ae [file] [log] [blame]
Yuichi Arakic876cd82016-02-05 14:39:00 +09001apply plugin: 'com.android.library'
2
3archivesBaseName = 'transition'
4
5dependencies {
Alan Viverette9439d702016-10-25 14:45:10 +01006 compile project(':support-annotations')
7 compile project(':support-v4')
Yuichi Arakic876cd82016-02-05 14:39:00 +09008
Aurimas Liutikasdfe75782016-08-03 14:27:20 -07009 androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
Yuichi Arakic876cd82016-02-05 14:39:00 +090010 exclude module: 'support-annotations'
11 }
Aurimas Liutikasdfe75782016-08-03 14:27:20 -070012 androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") {
Yuichi Arakic876cd82016-02-05 14:39:00 +090013 exclude module: 'support-annotations'
14 }
15 androidTestCompile 'org.mockito:mockito-core:1.9.5'
16 androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
17 androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
18 testCompile 'junit:junit:4.12'
19}
20
21android {
22 compileSdkVersion project.ext.currentSdk
23
24 defaultConfig {
25 minSdkVersion 14
26 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
27 }
28
29 sourceSets {
30 main.manifest.srcFile 'AndroidManifest.xml'
Alan Viverette9439d702016-10-25 14:45:10 +010031 main.java.srcDirs = [
32 'base',
33 'ics',
34 'kitkat',
35 'api21',
36 'api23',
37 'src'
38 ]
39 main.res.srcDirs = [
40 'res',
41 'res-public'
42 ]
Yuichi Arakic876cd82016-02-05 14:39:00 +090043
44 androidTest.setRoot('tests')
45 androidTest.java.srcDir 'tests/src'
46 androidTest.res.srcDir 'tests/res'
47 androidTest.manifest.srcFile 'tests/AndroidManifest.xml'
48 }
49
50 compileOptions {
51 sourceCompatibility JavaVersion.VERSION_1_7
52 targetCompatibility JavaVersion.VERSION_1_7
53 }
Yuichi Arakic876cd82016-02-05 14:39:00 +090054}
55
56android.libraryVariants.all { variant ->
57 def name = variant.buildType.name
58
59 if (name.equals(com.android.builder.core.BuilderConstants.DEBUG)) {
60 return; // Skip debug builds.
61 }
62 def suffix = name.capitalize()
63
Yuichi Arakic876cd82016-02-05 14:39:00 +090064 def sourcesJarTask = project.tasks.create(name: "sourceJar${suffix}", type: Jar) {
65 classifier = 'sources'
66 from android.sourceSets.main.java.srcDirs
67 }
68
Yuichi Arakic876cd82016-02-05 14:39:00 +090069 artifacts.add('archives', sourcesJarTask);
70}
71
72uploadArchives {
73 repositories {
74 mavenDeployer {
75 repository(url: uri(rootProject.ext.supportRepoOut)) {
76 }
77
78 pom.project {
79 name 'Android Transition Support Library'
80 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."
81 url 'http://developer.android.com/tools/extras/support-library.html'
82 inceptionYear '2011'
83
84 licenses {
85 license {
86 name 'The Apache Software License, Version 2.0'
87 url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
88 distribution 'repo'
89 }
90 }
91
92 scm {
93 url "http://source.android.com"
94 connection "scm:git:https://android.googlesource.com/platform/frameworks/support"
95 }
96 developers {
97 developer {
98 name 'The Android Open Source Project'
99 }
100 }
101 }
102 }
103 }
104}
105