blob: f247d8cc5dffe9662dce2b4f064fe4c1fffccdeb [file] [log] [blame]
Aurimas Liutikas9697da72016-12-22 15:50:42 -08001apply plugin: android.support.SupportLibraryPlugin
Aga Madurskadf451a02016-11-21 14:43:02 +00002archivesBaseName = 'wearable'
3
4dependencies {
5 compile project(':support-annotations')
6 compile project(':support-core-ui')
7 androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
8 exclude module: 'support-annotations'
9 }
10 androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") {
11 exclude module: 'support-annotations'
12 }
13 testCompile 'junit:junit:4.12'
14 testCompile "org.mockito:mockito-core:1.9.5"
15 testCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") {
16 exclude module: 'support-annotations'
17 }
18 androidTestCompile "org.mockito:mockito-core:1.9.5"
19 androidTestCompile "com.google.dexmaker:dexmaker:1.2"
20 androidTestCompile "com.google.dexmaker:dexmaker-mockito:1.2"
21}
22
23android {
24 compileSdkVersion project.ext.currentSdk
25
26 defaultConfig {
27 minSdkVersion 20
Aga Madurskadf451a02016-11-21 14:43:02 +000028 }
29
30 sourceSets {
Aga Madurskadf451a02016-11-21 14:43:02 +000031 main.java.srcDir 'src'
32 main.res.srcDirs 'res', 'res-public'
Aga Madurskadf451a02016-11-21 14:43:02 +000033 }
34
Aga Madurskadf451a02016-11-21 14:43:02 +000035 buildTypes.all {
36 consumerProguardFiles 'proguard-rules.pro'
37 }
38}
39
40android.libraryVariants.all { variant ->
41 def name = variant.buildType.name
42
43 if (name.equals(com.android.builder.core.BuilderConstants.DEBUG)) {
44 return; // Skip debug builds.
45 }
46 def suffix = name.capitalize()
47
Aga Madurskadf451a02016-11-21 14:43:02 +000048 def sourcesJarTask = project.tasks.create(name: "sourceJar${suffix}", type: Jar) {
49 classifier = 'sources'
50 from android.sourceSets.main.java.srcDirs
51 }
52
Aga Madurskadf451a02016-11-21 14:43:02 +000053 artifacts.add('archives', sourcesJarTask);
54}
55
56uploadArchives {
57 repositories {
58 mavenDeployer {
59 repository(url: uri(rootProject.ext.supportRepoOut)) {
60 }
61
62 pom.project {
63 name 'Android Wear Support UI'
64 description "Android Wear Support UI"
65 url 'http://developer.android.com/tools/extras/support-library.html'
66 inceptionYear '2016'
67
68 licenses {
69 license {
70 name 'The Apache Software License, Version 2.0'
71 url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
72 distribution 'repo'
73 }
74 }
75
76 scm {
77 url "http://source.android.com"
78 connection "scm:git:https://android.googlesource.com/platform/frameworks/support"
79 }
80 developers {
81 developer {
82 name 'The Android Open Source Project'
83 }
84 }
85 }
86 }
87 }
88}