-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
126 lines (108 loc) · 2.87 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
project.version = "1.0"
// Repositories
buildscript {
repositories { mavenCentral() }
dependencies {
classpath (
'com.mapvine:gradle-cobertura-plugin:1.0',
'nl.javadude.gradle.plugins:license-gradle-plugin:0.6.0',
'com.github.ben-manes:gradle-versions-plugin:0.3',
'com.tomcawley:gradle-protobuf-plugin:0.3',
)
}
}
repositories {
mavenCentral()
}
apply plugin: 'java'
apply plugin: 'gradleProtobufPlugin'
// extra plugins
apply plugin: 'eclipse'
apply plugin: 'versions'
apply plugin:'application'
// Reports plugins
apply plugin: 'build-dashboard'
apply plugin: 'findbugs'
apply plugin: 'checkstyle'
apply plugin: 'cobertura'
apply plugin: 'license'
dependencies {
compile (
'com.google.guava:guava:15.0',
'io.netty:netty-all:4.0.12.Final',
'io.netty:netty-transport-udt:4.0.12.Final',
'org.slf4j:slf4j-api:1.7.5',
'com.google.protobuf:protobuf-java:2.4.1',
'args4j:args4j:2.0.26',
'com.google.inject:guice:3.0',
)
runtime (
// Logback runtime
'ch.qos.logback:logback-classic:1.0.11',
'org.slf4j:log4j-over-slf4j:1.7.5',
'net.logstash.logback:logstash-logback-encoder:1.1',
'org.codehaus.janino:janino:2.6.1',
)
testCompile (
'junit:junit:4.11',
'org.easymock:easymock:3.1',
'org.powermock:powermock-module-junit4:1.5',
'org.powermock:powermock-api-easymock:1.5',
)
}
mainClassName = "bz.infectd.Application"
// Avoid cleanProto task (deletes code)
clean.dependsOn = []
run {
if(project.hasProperty('args')){
args project.args.split('\\s+')
}
}
test {
// Avoid VerifyError regards cobertura instrumentation
jvmArgs "-XX:-UseSplitVerifier"
}
javadoc {
options {
doclet = "com.visural.doclets.markdown.standard.Standard"
docletpath = [
rootProject.file('./extras/MarkdownDoclet-3.0.jar')
]
// http://sensemaya.org/maya/2009/07/10/making-javadoc-more-legible
stylesheetFile = rootProject.file('./extras/javadoc-stylesheet.css')
}
}
protoBuf {
protoc {
'Linux' {
path = '/usr/bin/protoc'
}
}
lang {
java
}
}
[findbugsMain, findbugsTest]*.reports {
xml.enabled false
html.enabled true
}
findbugs { ignoreFailures = true }
checkstyle {
configFile = rootProject.file("extras/checkstyle.xml")
}
cobertura {
format = 'html'
includes = ['**/*.java']
}
license {
// https://github.com/hierynomus/license-gradle-plugin
header rootProject.file('./extras/HEADER.license')
strictCheck true
ext.year = 2013
ext.email = 'dpenna.queiroz@gmail.com'
}
// Docker Tasks
task dockerBuild(dependsOn: distTar, type:Exec) {
// Build docker image
commandLine '/usr/bin/docker', 'build', '-rm=true', '.'
}