forked from spfrommer/JCommunique
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
89 lines (75 loc) · 1.53 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
sourceCompatibility = 1.7
targetCompatibility = 1.7
version = '2.0.0'
repositories {
jcenter()
}
dependencies {
testCompile 'junit:junit:4.12'
}
sourceSets {
main {
java {
srcDir 'src/main/java'
}
resources {
srcDir 'src/main/resources'
}
output.resourcesDir = "build/classes/main"
}
test {
java {
srcDir 'src/test/java'
}
}
}
test {
testLogging {
exceptionFormat = 'full'
}
}
clean {
delete "github-release"
delete "bintray-release"
delete "bin"
}
task createPom << {
pom {
project {
groupId 'org.jcommunique'
artifactId 'JCommunique'
version '2.0.0'
inceptionYear '2015'
licenses {
license {
name 'The MIT License'
url 'http://opensource.org/licenses/MIT'
distribution 'repo'
}
}
}
}.writeTo("pom.xml")
}
jar {
manifest {
attributes 'Implementation-Title': 'Gradle Quickstart',
'Implementation-Version': version
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
task rebuild(dependsOn: ['clean', 'build'])
build.mustRunAfter clean