forked from gini/dropwizard-gradle
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
62 lines (49 loc) · 1.33 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
apply plugin: 'java'
apply plugin: 'gradle-one-jar'
apply plugin: 'application'
// Use Java 7 by default
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
// UTF-8 should be standard by now. So use it!
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
// The main class of the application
mainClassName = 'com.example.helloworld.HelloWorldService'
// 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.3'
}
}
// Set our project variables
project.ext {
dropwizardVersion = '0.6.2'
}
repositories {
mavenCentral()
}
dependencies {
compile (
'com.yammer.dropwizard:dropwizard-core:' + dropwizardVersion,
'com.yammer.dropwizard:dropwizard-hibernate:' + dropwizardVersion,
'com.yammer.dropwizard:dropwizard-migrations:' + dropwizardVersion,
'com.yammer.dropwizard:dropwizard-auth:' + dropwizardVersion,
'com.h2database:h2:1.3.168'
)
}
// 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
}