blob: 8dd44bf19f64fe3b281ad4ed335e6f637658458e [file] [log] [blame]
Kirill Grouchnikovd3c53472016-05-10 08:02:18 -07001apply plugin: 'com.android.library'
2archivesBaseName = 'support-media-compat'
3
Kirill Grouchnikovd3c53472016-05-10 08:02:18 -07004dependencies {
Alan Viverette9439d702016-10-25 14:45:10 +01005 compile project(':support-annotations')
Kirill Grouchnikovd3c53472016-05-10 08:02:18 -07006 compile project(':support-compat')
Aurimas Liutikasdfe75782016-08-03 14:27:20 -07007 androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
Kirill Grouchnikovd3c53472016-05-10 08:02:18 -07008 exclude module: 'support-annotations'
9 }
Aurimas Liutikasdfe75782016-08-03 14:27:20 -070010 androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") {
Kirill Grouchnikovd3c53472016-05-10 08:02:18 -070011 exclude module: 'support-annotations'
12 }
13 androidTestCompile 'org.mockito:mockito-core:1.9.5'
14 androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
15 androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
16}
17
Kirill Grouchnikovd3c53472016-05-10 08:02:18 -070018android {
Alan Viverette9439d702016-10-25 14:45:10 +010019 compileSdkVersion project.ext.currentSdk
Kirill Grouchnikovd3c53472016-05-10 08:02:18 -070020
21 defaultConfig {
22 minSdkVersion 9
Sungsoo412e7352016-12-16 14:28:26 +090023
24 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Kirill Grouchnikovd3c53472016-05-10 08:02:18 -070025 }
26
27 sourceSets {
28 main.manifest.srcFile 'AndroidManifest.xml'
Alan Viverette9439d702016-10-25 14:45:10 +010029 main.java.srcDirs = [
30 'ics',
31 'jellybean-mr2',
32 'kitkat',
33 'api21',
34 'api22',
35 'api23',
36 'api24',
Alan Viverette9439d702016-10-25 14:45:10 +010037 'java'
38 ]
Kirill Grouchnikovd3c53472016-05-10 08:02:18 -070039 main.aidl.srcDirs = ['java']
Sungsoo412e7352016-12-16 14:28:26 +090040
41 androidTest.setRoot('tests')
42 androidTest.java.srcDir 'tests/src'
43 androidTest.res.srcDir 'tests/res'
44 androidTest.manifest.srcFile 'tests/AndroidManifest.xml'
Kirill Grouchnikovd3c53472016-05-10 08:02:18 -070045 }
46
Kirill Grouchnikovd3c53472016-05-10 08:02:18 -070047 compileOptions {
48 sourceCompatibility JavaVersion.VERSION_1_7
49 targetCompatibility JavaVersion.VERSION_1_7
50 }
51}
52
53android.libraryVariants.all { variant ->
54 def name = variant.buildType.name
55
56 if (name.equals(com.android.builder.core.BuilderConstants.DEBUG)) {
57 return; // Skip debug builds.
58 }
59 def suffix = name.capitalize()
60
Kirill Grouchnikovd3c53472016-05-10 08:02:18 -070061 def sourcesJarTask = project.tasks.create(name: "sourceJar${suffix}", type: Jar) {
62 classifier = 'sources'
63 from android.sourceSets.main.java.srcDirs
64 exclude('android/content/pm/**')
65 exclude('android/service/media/**')
66 }
67
Kirill Grouchnikovd3c53472016-05-10 08:02:18 -070068 artifacts.add('archives', sourcesJarTask);
69}
70
71uploadArchives {
72 repositories {
73 mavenDeployer {
74 repository(url: uri(rootProject.ext.supportRepoOut)) {
75 }
76
77 pom.project {
78 name 'Android Support Library v4'
79 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."
80 url 'http://developer.android.com/tools/extras/support-library.html'
81 inceptionYear '2011'
82
83 licenses {
84 license {
85 name 'The Apache Software License, Version 2.0'
86 url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
87 distribution 'repo'
88 }
89 }
90
91 scm {
92 url "http://source.android.com"
93 connection "scm:git:https://android.googlesource.com/platform/frameworks/support"
94 }
95 developers {
96 developer {
97 name 'The Android Open Source Project'
98 }
99 }
100 }
101 }
102 }
Sungsoo412e7352016-12-16 14:28:26 +0900103}