Aurimas Liutikas | 9697da7 | 2016-12-22 15:50:42 -0800 | [diff] [blame^] | 1 | apply plugin: android.support.SupportLibraryPlugin |
Aga Madurska | df451a0 | 2016-11-21 14:43:02 +0000 | [diff] [blame] | 2 | archivesBaseName = 'wearable' |
| 3 | |
| 4 | dependencies { |
| 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 | |
| 23 | android { |
| 24 | compileSdkVersion project.ext.currentSdk |
| 25 | |
| 26 | defaultConfig { |
| 27 | minSdkVersion 20 |
Aga Madurska | df451a0 | 2016-11-21 14:43:02 +0000 | [diff] [blame] | 28 | } |
| 29 | |
| 30 | sourceSets { |
Aga Madurska | df451a0 | 2016-11-21 14:43:02 +0000 | [diff] [blame] | 31 | main.java.srcDir 'src' |
| 32 | main.res.srcDirs 'res', 'res-public' |
Aga Madurska | df451a0 | 2016-11-21 14:43:02 +0000 | [diff] [blame] | 33 | } |
| 34 | |
Aga Madurska | df451a0 | 2016-11-21 14:43:02 +0000 | [diff] [blame] | 35 | buildTypes.all { |
| 36 | consumerProguardFiles 'proguard-rules.pro' |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | android.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 Madurska | df451a0 | 2016-11-21 14:43:02 +0000 | [diff] [blame] | 48 | def sourcesJarTask = project.tasks.create(name: "sourceJar${suffix}", type: Jar) { |
| 49 | classifier = 'sources' |
| 50 | from android.sourceSets.main.java.srcDirs |
| 51 | } |
| 52 | |
Aga Madurska | df451a0 | 2016-11-21 14:43:02 +0000 | [diff] [blame] | 53 | artifacts.add('archives', sourcesJarTask); |
| 54 | } |
| 55 | |
| 56 | uploadArchives { |
| 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 | } |