forked from inmotionsoftware/server-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
112 lines (95 loc) · 2.21 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
apply plugin: 'java'
apply plugin: 'gradle-one-jar'
apply plugin: 'application'
apply plugin: 'findbugs'
apply plugin: 'pmd'
apply plugin: 'idea'
sourceCompatibility = 1.8
targetCompatibility = 1.8
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
mainClassName = 'server.MainApplication'
repositories {
mavenCentral()
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.github.rholder:gradle-one-jar:1.0.4'
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.3'
}
dependencies {
compile 'io.dropwizard:dropwizard-core:1.1.0'
compile 'io.dropwizard:dropwizard-db:1.1.0'
compile 'io.dropwizard:dropwizard-hibernate:1.1.0'
compile 'io.dropwizard.modules:dropwizard-flyway:0.9.2-3'
compile 'io.dropwizard:dropwizard-migrations:1.1.0'
testCompile 'io.dropwizard:dropwizard-testing:1.1.0'
compile group: 'com.h2database', name: 'h2', version: '1.3.148'
}
sourceSets {
main {
java {
srcDir 'src/java'
}
resources {
srcDir 'src/resources'
}
}
}
jar {
baseName = 'test-server'
version = '1.0.0'
manifest {
attributes 'Main-Class': mainClassName
}
}
task copyResources(type: Copy) {
from "${projectDir}/src/java/server/config"
into "${buildDir}/config"
}
processResources.dependsOn copyResources
task debug(dependsOn: classes, type: JavaExec) {
main = mainClassName
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
ignoreExitValue = true
debug = true
args = ["server","${buildDir}/config/config.yml"]
}
run {
args "server", "${buildDir}/config/config.yml"
}
task oneJar(type: OneJar) {
mainClass = mainClassName
}
artifacts {
oneJar
}
findbugs {
ignoreFailures = true
toolVersion = "3.0.1"
sourceSets = [sourceSets.main]
reportsDir = file("$project.buildDir/reports/findbugs")
effort = "max"
}
tasks.withType(FindBugs) {
reports {
xml.enabled = false
html.enabled = true
}
}
pmd {
ignoreFailures = true
sourceSets = [sourceSets.main]
reportsDir = file("$project.buildDir/reports/pmd")
ruleSets = [
"java-basic",
"java-braces",
"java-imports"
]
}