Jaekyun Seok | bc73409 | 2014-04-10 08:12:34 +0900 | [diff] [blame] | 1 | apply plugin: 'android-library' |
| 2 | |
| 3 | archivesBaseName = 'support-leanback-v17' |
| 4 | |
| 5 | dependencies { |
| 6 | compile project(':support-v4') |
| 7 | compile project(':support-recyclerview-v7') |
| 8 | } |
| 9 | |
| 10 | android { |
Xavier Ducrohet | 9acddc7 | 2014-05-28 22:20:01 -0700 | [diff] [blame] | 11 | // WARNING: should be 17 |
Xavier Ducrohet | 3074ebe | 2014-06-02 10:54:39 -0700 | [diff] [blame] | 12 | compileSdkVersion 'current' |
Xavier Ducrohet | 9acddc7 | 2014-05-28 22:20:01 -0700 | [diff] [blame] | 13 | |
Jaekyun Seok | bc73409 | 2014-04-10 08:12:34 +0900 | [diff] [blame] | 14 | buildToolsVersion "19.0.1" |
| 15 | |
Xavier Ducrohet | 9acddc7 | 2014-05-28 22:20:01 -0700 | [diff] [blame] | 16 | defaultConfig { |
| 17 | minSdkVersion 17 |
| 18 | // TODO: get target from branch |
| 19 | //targetSdkVersion 19 |
| 20 | } |
| 21 | |
Jaekyun Seok | bc73409 | 2014-04-10 08:12:34 +0900 | [diff] [blame] | 22 | sourceSets { |
| 23 | main.manifest.srcFile 'AndroidManifest.xml' |
Xavier Ducrohet | 3074ebe | 2014-06-02 10:54:39 -0700 | [diff] [blame] | 24 | main.java.srcDirs = ['common', 'jbmr2', 'kitkat', 'api21', 'src'] |
| 25 | main.aidl.srcDirs = ['common', 'jbmr2', 'kitkat', 'api21', 'src'] |
Xavier Ducrohet | 9acddc7 | 2014-05-28 22:20:01 -0700 | [diff] [blame] | 26 | main.res.srcDirs = ['res'] |
| 27 | |
| 28 | androidTest.setRoot('tests') |
| 29 | androidTest.java.srcDir 'tests/java' |
Jaekyun Seok | bc73409 | 2014-04-10 08:12:34 +0900 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | lintOptions { |
| 33 | // TODO: fix errors and reenable. |
| 34 | abortOnError false |
| 35 | } |
Xavier Ducrohet | 9acddc7 | 2014-05-28 22:20:01 -0700 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | android.libraryVariants.all { variant -> |
| 39 | def name = variant.buildType.name |
| 40 | |
| 41 | if (name.equals(com.android.builder.BuilderConstants.DEBUG)) { |
| 42 | return; // Skip debug builds. |
| 43 | } |
| 44 | def suffix = name.capitalize() |
| 45 | |
| 46 | def jarTask = project.tasks.create(name: "jar${suffix}", type: Jar){ |
| 47 | dependsOn variant.javaCompile |
| 48 | from variant.javaCompile.destinationDir |
| 49 | from 'LICENSE.txt' |
| 50 | } |
| 51 | def javadocTask = project.tasks.create(name: "javadoc${suffix}", type: Javadoc) { |
| 52 | source android.sourceSets.main.allJava |
| 53 | classpath = files(variant.javaCompile.classpath.files) + files( |
| 54 | "${android.plugin.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar") |
| 55 | } |
| 56 | |
| 57 | def javadocJarTask = project.tasks.create(name: "javadocJar${suffix}", type: Jar) { |
| 58 | classifier = 'javadoc' |
| 59 | from 'build/docs/javadoc' |
| 60 | } |
| 61 | |
| 62 | def sourcesJarTask = project.tasks.create(name: "sourceJar${suffix}", type: Jar) { |
| 63 | classifier = 'sources' |
| 64 | from android.sourceSets.main.allSource |
| 65 | } |
| 66 | |
| 67 | artifacts.add('archives', javadocJarTask); |
| 68 | artifacts.add('archives', sourcesJarTask); |
| 69 | } |
| 70 | |
| 71 | uploadArchives { |
| 72 | repositories { |
| 73 | mavenDeployer { |
| 74 | repository(url: uri(rootProject.ext.supportRepoOut)) { |
| 75 | } |
| 76 | |
| 77 | pom.project { |
| 78 | name 'Android Support Leanback v17' |
| 79 | description "Android Support Leanback v17" |
| 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 | } |
| 103 | } |