diff options
author | Kevin Jin <kjin@google.com> | 2015-02-11 18:18:18 -0800 |
---|---|---|
committer | Kevin Jin <kjin@google.com> | 2015-02-11 18:29:06 -0800 |
commit | 85ac3efb066be44e93941edb24157c22a5a365de (patch) | |
tree | f4ca719aa980961a30e30133b2fec3f2be812e30 /build.gradle | |
parent | f8184a4babf7ab9cc356b1c61170869a6d6ce13c (diff) | |
download | droiddriver-85ac3efb066be44e93941edb24157c22a5a365de.tar.gz |
Generate JavaDoc and source jar
Add the install task to publish to local M2 repository
Change-Id: I1fd51172128ce617929d531f8aac7c757a724edc
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/build.gradle b/build.gradle index 83ffff7..b5d6734 100644 --- a/build.gradle +++ b/build.gradle @@ -8,11 +8,19 @@ buildscript { dependencies { // this requires Gradle 2 classpath 'com.android.tools.build:gradle:1.0.1' + classpath 'com.github.dcendents:android-maven-plugin:1.2' } } apply plugin: 'com.android.library' +tasks.withType(JavaCompile) { + options.compilerArgs << "-Xlint:deprecation" +} + +version = '1.0.0' +group = 'io.appium' + android { compileSdkVersion 21 buildToolsVersion "21.1.2" @@ -20,6 +28,8 @@ android { defaultConfig { minSdkVersion 12 // TODO: need to support SDK 9? targetSdkVersion 21 + versionCode 1 + versionName version } compileOptions { @@ -34,3 +44,40 @@ android { } } } + +apply plugin: 'com.github.dcendents.android-maven' + +install { + repositories.mavenInstaller { + pom { + project { + licenses { + license { + name 'The Apache Software License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + } + } + } + } + } +} + +task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' +} + +task javadoc(type: Javadoc) { + source = android.sourceSets.main.java.srcDirs + classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) +} + +task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir +} + +artifacts { + archives javadocJar + archives sourcesJar +} |