forked from stevenalexander/dropwizard-jdbi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
73 lines (60 loc) · 1.5 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
apply plugin: 'java'
apply plugin: 'flyway'
apply plugin: 'gradle-one-jar'
apply plugin: 'application'
apply plugin: 'idea'
// 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.ExampleApplication'
// 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'
classpath 'com.h2database:h2:1.4.181'
classpath 'org.flywaydb:flyway-gradle-plugin:3.0'
}
}
// Set our project variables
project.ext {
dropwizardVersion = '0.8.0'
}
repositories {
mavenCentral()
}
dependencies {
compile (
'io.dropwizard:dropwizard-core:' + dropwizardVersion,
'io.dropwizard:dropwizard-jdbi:' + dropwizardVersion,
'com.h2database:h2:1.4.181',
'org.flywaydb:flyway-gradle-plugin:3.0'
)
testCompile (
'io.dropwizard:dropwizard-testing:' + dropwizardVersion
)
}
// Configure flyway
flyway {
url = 'jdbc:h2:file:./persondb'
user = 'sa'
}
// Configure the oneJar task
task oneJar(type: OneJar) {
mainClass = mainClassName
}
// Configure the run task to start the Dropwizard service
run {
args 'server', './config.yml'
}
task wrapper(type: Wrapper) {
gradleVersion = '1.4'
}
artifacts {
oneJar
}