Yigit Boyar | 02a9e8c | 2016-01-26 20:41:00 -0800 | [diff] [blame] | 1 | apply plugin: 'com.android.library' |
Xavier Ducrohet | 86fb8ef | 2013-02-22 15:04:37 -0800 | [diff] [blame] | 2 | archivesBaseName = 'support-v13' |
| 3 | |
Alan Viverette | 9439d70 | 2016-10-25 14:45:10 +0100 | [diff] [blame^] | 4 | dependencies { |
| 5 | compile project(':support-annotations') |
| 6 | compile project(':support-v4') |
| 7 | } |
Justin Klaassen | 68e7adb | 2016-01-21 12:50:47 -0800 | [diff] [blame] | 8 | |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 9 | android { |
Alan Viverette | 9439d70 | 2016-10-25 14:45:10 +0100 | [diff] [blame^] | 10 | compileSdkVersion project.ext.currentSdk |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 11 | |
| 12 | defaultConfig { |
| 13 | minSdkVersion 13 |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 14 | } |
| 15 | |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 16 | sourceSets { |
| 17 | main.manifest.srcFile 'AndroidManifest.xml' |
Alan Viverette | 9439d70 | 2016-10-25 14:45:10 +0100 | [diff] [blame^] | 18 | main.java.srcDirs = [ |
| 19 | 'ics', |
| 20 | 'ics-mr1', |
| 21 | 'api23', |
| 22 | 'api24', |
| 23 | 'api25', |
| 24 | 'java' |
| 25 | ] |
Justin Klaassen | 68e7adb | 2016-01-21 12:50:47 -0800 | [diff] [blame] | 26 | } |
| 27 | |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 28 | lintOptions { |
| 29 | // TODO: fix errors and reenable. |
| 30 | abortOnError false |
| 31 | } |
Yigit Boyar | 02a9e8c | 2016-01-26 20:41:00 -0800 | [diff] [blame] | 32 | |
| 33 | compileOptions { |
| 34 | sourceCompatibility JavaVersion.VERSION_1_7 |
| 35 | targetCompatibility JavaVersion.VERSION_1_7 |
| 36 | } |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | android.libraryVariants.all { variant -> |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 40 | def name = variant.buildType.name |
| 41 | |
Chris Banes | 4efd038 | 2015-03-05 20:04:05 +0000 | [diff] [blame] | 42 | if (name.equals(com.android.builder.core.BuilderConstants.DEBUG)) { |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 43 | return; // Skip debug builds. |
| 44 | } |
| 45 | def suffix = name.capitalize() |
| 46 | |
| 47 | def jarTask = project.tasks.create(name: "jar${suffix}", type: Jar){ |
| 48 | dependsOn variant.javaCompile |
| 49 | from variant.javaCompile.destinationDir |
| 50 | from 'LICENSE.txt' |
| 51 | } |
| 52 | def javadocTask = project.tasks.create(name: "javadoc${suffix}", type: Javadoc) { |
Chris Banes | 4efd038 | 2015-03-05 20:04:05 +0000 | [diff] [blame] | 53 | source android.sourceSets.main.java |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 54 | classpath = files(variant.javaCompile.classpath.files) + files( |
Chris Banes | 4efd038 | 2015-03-05 20:04:05 +0000 | [diff] [blame] | 55 | "${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar") |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 56 | } |
| 57 | |
| 58 | def javadocJarTask = project.tasks.create(name: "javadocJar${suffix}", type: Jar) { |
| 59 | classifier = 'javadoc' |
| 60 | from 'build/docs/javadoc' |
| 61 | } |
| 62 | |
| 63 | def sourcesJarTask = project.tasks.create(name: "sourceJar${suffix}", type: Jar) { |
| 64 | classifier = 'sources' |
Chris Banes | 4efd038 | 2015-03-05 20:04:05 +0000 | [diff] [blame] | 65 | from android.sourceSets.main.java.srcDirs |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 66 | } |
| 67 | |
Yigit Boyar | 5932b6f | 2014-04-30 13:43:59 -0700 | [diff] [blame] | 68 | artifacts.add('archives', javadocJarTask); |
| 69 | artifacts.add('archives', sourcesJarTask); |
Xavier Ducrohet | 86fb8ef | 2013-02-22 15:04:37 -0800 | [diff] [blame] | 70 | } |
| 71 | |
| 72 | uploadArchives { |
| 73 | repositories { |
| 74 | mavenDeployer { |
| 75 | |
Xavier Ducrohet | 855a922 | 2014-01-02 19:00:43 -0800 | [diff] [blame] | 76 | repository(url: uri(rootProject.ext.supportRepoOut)) { |
Xavier Ducrohet | 86fb8ef | 2013-02-22 15:04:37 -0800 | [diff] [blame] | 77 | } |
| 78 | |
| 79 | pom.project { |
| 80 | name 'Android Support Library v13' |
| 81 | description "The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs. Compatible on devices running API 13 or later." |
| 82 | url 'http://developer.android.com/tools/extras/support-library.html' |
| 83 | inceptionYear '2011' |
| 84 | |
| 85 | licenses { |
| 86 | license { |
| 87 | name 'The Apache Software License, Version 2.0' |
| 88 | url 'http://www.apache.org/licenses/LICENSE-2.0.txt' |
| 89 | distribution 'repo' |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | scm { |
| 94 | url "http://source.android.com" |
| 95 | connection "scm:git:https://android.googlesource.com/platform/frameworks/support" |
| 96 | } |
| 97 | developers { |
| 98 | developer { |
| 99 | name 'The Android Open Source Project' |
| 100 | } |
| 101 | } |
| 102 | } |
| 103 | } |
| 104 | } |
| 105 | } |