Skip to content

Commit 6fb8d07

Browse files
committed
Prepared for maven release
1 parent d400505 commit 6fb8d07

File tree

4 files changed

+94
-2
lines changed

4 files changed

+94
-2
lines changed

android-kiss-api/build.gradle

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,19 @@ sourceSets {
1111
dependencies {
1212
compile fileTree(dir: 'libs', include: ['*.jar'])
1313
provided "com.google.android:android:4.1.1.4"
14+
}
15+
16+
task javadocJar(type: Jar, dependsOn: javadoc) {
17+
classifier = 'javadoc'
18+
from 'build/docs/javadoc'
19+
}
20+
21+
task sourcesJar(type: Jar) {
22+
from sourceSets.main.allSource
23+
classifier = 'sources'
24+
}
25+
26+
artifacts {
27+
archives javadocJar
28+
archives sourcesJar
1429
}

android-kiss-processors/build.gradle

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,19 @@ apply plugin: 'java'
33
dependencies {
44
compile project(':android-kiss-api')
55
compile 'com.squareup:javawriter:2.5.+'
6+
}
7+
8+
task javadocJar(type: Jar, dependsOn: javadoc) {
9+
classifier = 'javadoc'
10+
from 'build/docs/javadoc'
11+
}
12+
13+
task sourcesJar(type: Jar) {
14+
from sourceSets.main.allSource
15+
classifier = 'sources'
16+
}
17+
18+
artifacts {
19+
archives javadocJar
20+
archives sourcesJar
621
}

android-kiss/build.gradle

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,18 @@ android {
1515

1616
compileSdkVersion 19
1717
buildToolsVersion "19.0.3"
18-
}
18+
}
19+
20+
android.libraryVariants.all { variant ->
21+
println("DOING JOB ON $name")
22+
def name = variant.name
23+
task "javadoc$name"(type: Javadoc) {
24+
description = "Generates javadoc for build $name"
25+
destinationDir = new File(destinationDir, variant.baseName)
26+
source = files(variant.javaCompile.source)
27+
classpath = files(android.plugin.runtimeJarList, variant.javaCompile.classpath)
28+
exclude '**/R.html', '**/R.*.html'
29+
}
30+
}
31+
32+
//task javadoc(dependsOn: javadocDebug)

build.gradle

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,64 @@ buildscript {
1010
}
1111
}
1212

13-
1413
allprojects {
1514
repositories {
1615
mavenCentral()
1716
}
1817

18+
apply plugin: 'maven'
19+
apply plugin: 'signing'
1920
apply plugin: 'license'
2021

22+
group = 'com.joanzapata.android.kiss'
23+
version = '0.0.1-alpha'
24+
2125
license {
2226
header rootProject.file('LICENSE')
2327
strictCheck true
2428
}
29+
30+
signing {
31+
sign configurations.archives
32+
}
33+
34+
uploadArchives {
35+
repositories {
36+
mavenDeployer {
37+
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
38+
39+
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
40+
authentication(userName: sonatypeUsername, password: sonatypePassword)
41+
}
42+
43+
pom.project {
44+
name 'android-kiss'
45+
packaging 'jar'
46+
description 'Kiss uses annotations to shorten the code to start asynchronous long running tasks and cache results'
47+
url 'https://github.com/JoanZapata/android-kiss'
48+
49+
scm {
50+
url 'scm:git@github.com:JoanZapata/android-kiss.git'
51+
connection 'scm:git@github.com:JoanZapata/android-kiss.git'
52+
developerConnection 'scm:git@github.com:JoanZapata/android-kiss.git'
53+
}
54+
55+
licenses {
56+
license {
57+
name 'The Apache Software License, Version 2.0'
58+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
59+
distribution 'repo'
60+
}
61+
}
62+
63+
developers {
64+
developer {
65+
id 'joanzapata'
66+
name 'Joan Zapata'
67+
}
68+
}
69+
}
70+
}
71+
}
72+
}
2573
}

0 commit comments

Comments
 (0)