Yigit Boyar | 02a9e8c | 2016-01-26 20:41:00 -0800 | [diff] [blame] | 1 | apply plugin: 'com.android.library' |
Xavier Ducrohet | 9cfef19 | 2014-06-17 11:58:53 -0700 | [diff] [blame] | 2 | archivesBaseName = 'leanback-v17' |
Jaekyun Seok | bc73409 | 2014-04-10 08:12:34 +0900 | [diff] [blame] | 3 | |
| 4 | dependencies { |
Dake Gu | 5738b99 | 2016-10-06 15:09:24 -0700 | [diff] [blame] | 5 | compile project(':support-compat') |
| 6 | compile project(':support-core-ui') |
| 7 | compile project(':support-media-compat') |
| 8 | compile project(':support-fragment') |
Jaekyun Seok | bc73409 | 2014-04-10 08:12:34 +0900 | [diff] [blame] | 9 | compile project(':support-recyclerview-v7') |
Aurimas Liutikas | dfe7578 | 2016-08-03 14:27:20 -0700 | [diff] [blame] | 10 | androidTestCompile ("com.android.support.test:runner:${project.rootProject.ext.testRunnerVersion}") { |
susnata | 7d7bf95 | 2016-06-06 16:21:50 -0700 | [diff] [blame] | 11 | exclude module: 'support-annotations' |
| 12 | } |
Aurimas Liutikas | dfe7578 | 2016-08-03 14:27:20 -0700 | [diff] [blame] | 13 | androidTestCompile ("com.android.support.test.espresso:espresso-core:${project.rootProject.ext.espressoVersion}") { |
susnata | 7d7bf95 | 2016-06-06 16:21:50 -0700 | [diff] [blame] | 14 | exclude module: 'support-annotations' |
| 15 | } |
| 16 | testCompile 'junit:junit:4.12' |
susnata | b3756c5 | 2016-06-08 14:34:41 -0700 | [diff] [blame] | 17 | androidTestCompile "org.mockito:mockito-core:1.9.5" |
| 18 | androidTestCompile "com.google.dexmaker:dexmaker:1.2" |
| 19 | androidTestCompile "com.google.dexmaker:dexmaker-mockito:1.2" |
Jaekyun Seok | bc73409 | 2014-04-10 08:12:34 +0900 | [diff] [blame] | 20 | } |
| 21 | |
| 22 | android { |
Yigit Boyar | 02a9e8c | 2016-01-26 20:41:00 -0800 | [diff] [blame] | 23 | compileSdkVersion project.ext.currentSdk |
Xavier Ducrohet | 9acddc7 | 2014-05-28 22:20:01 -0700 | [diff] [blame] | 24 | |
Xavier Ducrohet | 9acddc7 | 2014-05-28 22:20:01 -0700 | [diff] [blame] | 25 | defaultConfig { |
| 26 | minSdkVersion 17 |
susnata | 7d7bf95 | 2016-06-06 16:21:50 -0700 | [diff] [blame] | 27 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
Xavier Ducrohet | 9acddc7 | 2014-05-28 22:20:01 -0700 | [diff] [blame] | 28 | } |
| 29 | |
Jaekyun Seok | bc73409 | 2014-04-10 08:12:34 +0900 | [diff] [blame] | 30 | sourceSets { |
| 31 | main.manifest.srcFile 'AndroidManifest.xml' |
Alan Viverette | 9439d70 | 2016-10-25 14:45:10 +0100 | [diff] [blame] | 32 | main.java.srcDirs = [ |
| 33 | 'common', |
| 34 | 'jbmr2', |
| 35 | 'kitkat', |
| 36 | 'api21', |
| 37 | 'api23', |
| 38 | 'src' |
| 39 | ] |
| 40 | main.res.srcDir 'res' |
Xavier Ducrohet | 9acddc7 | 2014-05-28 22:20:01 -0700 | [diff] [blame] | 41 | |
| 42 | androidTest.setRoot('tests') |
| 43 | androidTest.java.srcDir 'tests/java' |
susnata | 7d7bf95 | 2016-06-06 16:21:50 -0700 | [diff] [blame] | 44 | androidTest.res.srcDir 'tests/res' |
| 45 | androidTest.manifest.srcFile 'tests/AndroidManifest.xml' |
Jaekyun Seok | bc73409 | 2014-04-10 08:12:34 +0900 | [diff] [blame] | 46 | } |
| 47 | |
Alan Viverette | af6b251 | 2016-11-16 17:33:10 -0500 | [diff] [blame] | 48 | lintOptions { |
| 49 | // Remove this once all NewApi breakages have been fixed. |
| 50 | disable "NewApi" |
| 51 | } |
| 52 | |
Tony Mantler | 27a731e | 2015-03-16 15:58:25 -0700 | [diff] [blame] | 53 | compileOptions { |
| 54 | sourceCompatibility JavaVersion.VERSION_1_7 |
| 55 | targetCompatibility JavaVersion.VERSION_1_7 |
| 56 | } |
Xavier Ducrohet | 9acddc7 | 2014-05-28 22:20:01 -0700 | [diff] [blame] | 57 | } |
| 58 | |
| 59 | android.libraryVariants.all { variant -> |
| 60 | def name = variant.buildType.name |
| 61 | |
Chris Banes | 4efd038 | 2015-03-05 20:04:05 +0000 | [diff] [blame] | 62 | if (name.equals(com.android.builder.core.BuilderConstants.DEBUG)) { |
Xavier Ducrohet | 9acddc7 | 2014-05-28 22:20:01 -0700 | [diff] [blame] | 63 | return; // Skip debug builds. |
| 64 | } |
| 65 | def suffix = name.capitalize() |
| 66 | |
| 67 | def jarTask = project.tasks.create(name: "jar${suffix}", type: Jar){ |
| 68 | dependsOn variant.javaCompile |
| 69 | from variant.javaCompile.destinationDir |
| 70 | from 'LICENSE.txt' |
| 71 | } |
| 72 | def javadocTask = project.tasks.create(name: "javadoc${suffix}", type: Javadoc) { |
Chris Banes | 4efd038 | 2015-03-05 20:04:05 +0000 | [diff] [blame] | 73 | source android.sourceSets.main.java |
Xavier Ducrohet | 9acddc7 | 2014-05-28 22:20:01 -0700 | [diff] [blame] | 74 | classpath = files(variant.javaCompile.classpath.files) + files( |
Chris Banes | 4efd038 | 2015-03-05 20:04:05 +0000 | [diff] [blame] | 75 | "${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar") |
Xavier Ducrohet | 9acddc7 | 2014-05-28 22:20:01 -0700 | [diff] [blame] | 76 | } |
| 77 | |
| 78 | def javadocJarTask = project.tasks.create(name: "javadocJar${suffix}", type: Jar) { |
| 79 | classifier = 'javadoc' |
| 80 | from 'build/docs/javadoc' |
| 81 | } |
| 82 | |
| 83 | def sourcesJarTask = project.tasks.create(name: "sourceJar${suffix}", type: Jar) { |
| 84 | classifier = 'sources' |
Chris Banes | 4efd038 | 2015-03-05 20:04:05 +0000 | [diff] [blame] | 85 | from android.sourceSets.main.java.srcDirs |
Xavier Ducrohet | 9acddc7 | 2014-05-28 22:20:01 -0700 | [diff] [blame] | 86 | } |
| 87 | |
| 88 | artifacts.add('archives', javadocJarTask); |
| 89 | artifacts.add('archives', sourcesJarTask); |
| 90 | } |
| 91 | |
| 92 | uploadArchives { |
| 93 | repositories { |
| 94 | mavenDeployer { |
| 95 | repository(url: uri(rootProject.ext.supportRepoOut)) { |
| 96 | } |
| 97 | |
| 98 | pom.project { |
| 99 | name 'Android Support Leanback v17' |
| 100 | description "Android Support Leanback v17" |
| 101 | url 'http://developer.android.com/tools/extras/support-library.html' |
| 102 | inceptionYear '2011' |
| 103 | |
| 104 | licenses { |
| 105 | license { |
| 106 | name 'The Apache Software License, Version 2.0' |
| 107 | url 'http://www.apache.org/licenses/LICENSE-2.0.txt' |
| 108 | distribution 'repo' |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | scm { |
| 113 | url "http://source.android.com" |
| 114 | connection "scm:git:https://android.googlesource.com/platform/frameworks/support" |
| 115 | } |
| 116 | developers { |
| 117 | developer { |
| 118 | name 'The Android Open Source Project' |
| 119 | } |
| 120 | } |
| 121 | } |
| 122 | } |
| 123 | } |
| 124 | } |