blob: 0c8c41300123004398923c52e0536c4bbae9131d [file] [log] [blame]
Jaekyun Seokbc734092014-04-10 08:12:34 +09001apply plugin: 'android-library'
2
3archivesBaseName = 'support-leanback-v17'
4
5dependencies {
6 compile project(':support-v4')
7 compile project(':support-recyclerview-v7')
8}
9
10android {
Xavier Ducrohet9acddc72014-05-28 22:20:01 -070011 // WARNING: should be 17
Xavier Ducrohet3074ebe2014-06-02 10:54:39 -070012 compileSdkVersion 'current'
Xavier Ducrohet9acddc72014-05-28 22:20:01 -070013
Jaekyun Seokbc734092014-04-10 08:12:34 +090014 buildToolsVersion "19.0.1"
15
Xavier Ducrohet9acddc72014-05-28 22:20:01 -070016 defaultConfig {
17 minSdkVersion 17
18 // TODO: get target from branch
19 //targetSdkVersion 19
20 }
21
Jaekyun Seokbc734092014-04-10 08:12:34 +090022 sourceSets {
23 main.manifest.srcFile 'AndroidManifest.xml'
Xavier Ducrohet3074ebe2014-06-02 10:54:39 -070024 main.java.srcDirs = ['common', 'jbmr2', 'kitkat', 'api21', 'src']
25 main.aidl.srcDirs = ['common', 'jbmr2', 'kitkat', 'api21', 'src']
Xavier Ducrohet9acddc72014-05-28 22:20:01 -070026 main.res.srcDirs = ['res']
27
28 androidTest.setRoot('tests')
29 androidTest.java.srcDir 'tests/java'
Jaekyun Seokbc734092014-04-10 08:12:34 +090030 }
31
32 lintOptions {
33 // TODO: fix errors and reenable.
34 abortOnError false
35 }
Xavier Ducrohet9acddc72014-05-28 22:20:01 -070036}
37
38android.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
71uploadArchives {
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}