diff options
author | Xavier Ducrohet <xav@android.com> | 2012-09-26 18:48:37 -0700 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2012-10-02 17:05:45 -0700 |
commit | d19ce5efa561089937102f19a373ac5324311a03 (patch) | |
tree | 37d4dbcc7b877a828fb91352d1ee2aed33712b72 /build.gradle | |
parent | 52bd84fffbdff2e31217f3466ce07cf2548b286b (diff) | |
download | replicant_sdk-d19ce5efa561089937102f19a373ac5324311a03.zip replicant_sdk-d19ce5efa561089937102f19a373ac5324311a03.tar.gz replicant_sdk-d19ce5efa561089937102f19a373ac5324311a03.tar.bz2 |
Update the gradle build files.
add javadoc and source artifacts as well as POM information
to upload to Maven Central.
Change-Id: I51701f5a5db5b2ae41ecede115e2b36adf1fa05e
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 46 |
1 files changed, 37 insertions, 9 deletions
diff --git a/build.gradle b/build.gradle index 858b4d0..982e93a 100644 --- a/build.gradle +++ b/build.gradle @@ -1,18 +1,46 @@ -allprojects { +project.buildDir = 'gradle_build' + +subprojects { + apply plugin: 'java' apply plugin: 'maven' + apply plugin: 'signing' repositories { mavenCentral() } - version = '21.0-SNAPSHOT' + group = 'com.android.tools' + + project.ext { + baseVersion = '21.0' + } + + // custom tasks for creating source/javadoc jars + task sourcesJar(type: Jar, dependsOn:classes) { + classifier = 'sources' + from sourceSets.main.allSource + } - uploadArchives { - repositories { - mavenDeployer { - repository(url: uri("$rootDir/../out/host/repo")) - } - } - } + task javadocJar(type: Jar, dependsOn:javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir + } + + // add javadoc/source jar tasks as artifacts + artifacts { + archives jar + + archives sourcesJar + archives javadocJar + } + + task publishLocal(type: Upload) { + configuration = configurations.archives + repositories { + mavenDeployer { + repository(url: uri("$rootDir/../out/host/repo")) + } + } + } } |