-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
73 lines (58 loc) · 1.64 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
plugins {
id 'net.franz-becker.gradle-lombok' version '1.5'
}
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'application'
apply plugin: 'idea'
apply plugin: 'findbugs'
//needed in order to get Lombok working
apply plugin: 'war'
mainClassName = "pl.agh.edu.Automaton.Main"
version = "1.0"
repositories {
mavenCentral()
}
// generating single Jar
task fatJar(type: Jar) {
delete "build/libs"
manifest {
attributes "Main-Class": "$mainClassName"
}
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
// generating JavaDoc
import net.franz_becker.gradle.lombok.task.DelombokTask
task delombok(type: DelombokTask) {
args("src/main/java", "-d", "src/delombok/java")
}
task deleteDelombok(type: Delete) {
delete "src/delombok"
}
task myJavadocs(type: Javadoc) {
source = "src/delombok/java"
}
myJavadocs.dependsOn delombok
clean.dependsOn deleteDelombok
findbugsMain {
reports {
xml.enabled = false
html.enabled = true
}
}
findbugsTest {
reports {
xml.enabled = false
html.enabled = true
}
}
dependencies {
providedCompile "org.projectlombok:lombok:1.16.6"
testCompile group: 'junit', name: 'junit', version: '4.+'
testCompile 'org.mockito:mockito-all:1.9.5'
testCompile 'org.codehaus.groovy:groovy-all:2.3.11'
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
testCompile "cglib:cglib-nodep:3.1" // allows mocking of classes (in addition to interfaces)
testCompile "org.objenesis:objenesis:2.1" // allows mocking of classes without default constructor (together with CGLIB)
}