-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
58 lines (50 loc) · 1.33 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
apply plugin: 'java'
apply plugin: 'maven'
archivesBaseName = 'laggedHero-annotations'
sourceSets {
main.java.srcDir 'src'
}
jar {
from sourceSets.main.output
}
task writePom << {
pom {
project {
name 'LaggedHero Annotations'
description "Some random annotations."
url 'https://github.com/laggedHero/annotations'
inceptionYear '2015'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
developers {
developer {
name 'LaggedHero'
}
}
}
}.writeTo("$buildDir/pom.xml")
}
// configuration for the javadoc to include all source sets.
javadoc {
source sourceSets.main.allJava
}
// custom tasks for creating source/javadoc jars
task sourcesJar(type: Jar, dependsOn:classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
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
}