-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
80 lines (66 loc) · 2.07 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
group 'com.devclinton'
version '0.1-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'gradle-one-jar'
apply plugin: 'application'
sourceCompatibility = 1.8
// UTF-8 should be standard by now. So use it!
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
// The main class of the application
mainClassName = 'com.devclinton.WindowMetrics.WindowMetricsService'
// Add Gradle OneJar Plugin, see https://github.com/rholder/gradle-one-jar
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.github.rholder:gradle-one-jar:1.0.4'
}
}
repositories {
mavenCentral()
}
// Set our project variables
project.ext {
dropwizardVersion = '0.9.0-rc4';
postgresVersion = '9.4-1204-jdbc42'
}
repositories {
mavenCentral()
}
dependencies {
compile(
'io.dropwizard:dropwizard-core:' + dropwizardVersion,
'io.dropwizard:dropwizard-testing:' + dropwizardVersion,
'io.dropwizard:dropwizard-auth:' + dropwizardVersion,
'io.dropwizard:dropwizard-hibernate:' + dropwizardVersion,
'io.dropwizard:dropwizard-metrics:' + dropwizardVersion,
'io.dropwizard:dropwizard-validation:' + dropwizardVersion,
'io.dropwizard:dropwizard-migrations:' + dropwizardVersion,
'io.dropwizard:dropwizard-benchmarks:' + dropwizardVersion,
'net.java.dev.jna:jna:4.2.0',
'net.java.dev.jna:jna-platform:4.2.0',
//database depends
'org.postgresql:postgresql:' + postgresVersion,
'com.h2database:h2:1.4.190',
//documentation
'io.federecio:dropwizard-swagger:0.7.0',
//Hasing files
'commons-codec:commons-codec:1.10'
)
testCompile group: 'junit', name: 'junit', version: '4.11'
}
// Configure the oneJar task
task oneJar(type: OneJar) {
mainClass = mainClassName
}
// Configure the run task to start the Dropwizard service
run {
args 'server', './src/dist/config/helloworld.yml'
}
task wrapper(type: Wrapper) {
gradleVersion = '1.4'
}
artifacts {
oneJar
}