-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
72 lines (55 loc) · 1.51 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
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'gradle-one-jar'
apply plugin: 'application'
apply plugin : 'shadow'
//Use java 7
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
mainClassName = 'com.github.stmishra.samples.service.DropwizardBootstrapSample'
// UTF-8 should be standard by now. So use it!
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
jar {
baseName = 'dropwizard-bootstrap-sample'
version = '0.1.0'
manifest {
attributes 'Main-Class': mainClassName
}
}
project.ext {
dropwizardVersion = '0.6.2'
sqliteJdbcVersion = '3.7.2'
}
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.github.rholder:gradle-one-jar:1.0.4'
classpath 'com.github.jengelman.gradle.plugins:shadow:0.8'
}
}
repositories {
mavenCentral()
}
dependencies {
compile('com.yammer.dropwizard:dropwizard-core:' + dropwizardVersion)
compile ('com.yammer.dropwizard:dropwizard-jdbi:' + dropwizardVersion)
compile ('com.yammer.dropwizard:dropwizard-migrations:' + dropwizardVersion)
compile ('org.xerial:sqlite-jdbc:' + sqliteJdbcVersion)
//Test jars
testCompile('junit:junit:4.8.2')
}
// Configure the run task to start the Dropwizard service
run {
args 'server', './src/dist/config/dropwizard-bootstrap-config.yml'
}
task buildWebApp(type: OneJar) {
mainClass = mainClassName
archiveName = 'Webapp.jar'
}
artifacts {
archives buildWebApp
}