-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
74 lines (62 loc) · 1.47 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
plugins {
id 'java'
id 'maven'
id 'eclipse'
id 'idea'
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.8.1'
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
group = 'org.eva4j'
version = file('version').text
repositories {
jcenter()
}
dependencies {
// load managable dependencies
def s = '[ \t]*', w = '[^:#@]+?'
(file('mdeps').text =~ /(?m)^$s($w):($w):($w)?(:$w)?(@$w)?$s(?:#$s($w)?$s)?$/).each {
match, group, name, version, classifier, ext, configuration ->
add(configuration ?: 'compile', "$group:$name:${version?:'latest.integration'}${classifier?:''}${ext?:''}")
}
testCompile 'junit:junit:4.12'
}
configurations.all {
resolutionStrategy {
cacheDynamicVersionsFor 0, 'seconds'
cacheChangingModulesFor 0, 'seconds'
}
}
test {
testLogging {
events "failed"
exceptionFormat "full"
}
}
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
jar {
manifest.attributes (
'Specification-Title': project.name,
'Specification-Version': version,
'Implementation-Title': project.name,
'Implementation-Version': "$version (${new Date().format('yyyy-MM-dd')})",
)
}
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
}