File tree Expand file tree Collapse file tree 4 files changed +94
-2
lines changed Expand file tree Collapse file tree 4 files changed +94
-2
lines changed Original file line number Diff line number Diff line change @@ -11,4 +11,19 @@ sourceSets {
11
11
dependencies {
12
12
compile fileTree(dir : ' libs' , include : [' *.jar' ])
13
13
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
14
29
}
Original file line number Diff line number Diff line change @@ -3,4 +3,19 @@ apply plugin: 'java'
3
3
dependencies {
4
4
compile project(' :android-kiss-api' )
5
5
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
6
21
}
Original file line number Diff line number Diff line change @@ -15,4 +15,18 @@ android {
15
15
16
16
compileSdkVersion 19
17
17
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)
Original file line number Diff line number Diff line change @@ -10,16 +10,64 @@ buildscript {
10
10
}
11
11
}
12
12
13
-
14
13
allprojects {
15
14
repositories {
16
15
mavenCentral()
17
16
}
18
17
18
+ apply plugin : ' maven'
19
+ apply plugin : ' signing'
19
20
apply plugin : ' license'
20
21
22
+ group = ' com.joanzapata.android.kiss'
23
+ version = ' 0.0.1-alpha'
24
+
21
25
license {
22
26
header rootProject. file(' LICENSE' )
23
27
strictCheck true
24
28
}
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
+ }
25
73
}
You can’t perform that action at this time.
0 commit comments