-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
60 lines (48 loc) · 1.38 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
group 'de.qaware.sandbox'
version '1.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'gradle-one-jar'
apply plugin: 'application'
// Use Java 8 by default
sourceCompatibility = '1.8'
targetCompatibility = '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 = 'de.qaware.sandbox.dockerWizard.DockerWizardApplication'
// 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.9.2'
}
repositories {
mavenCentral()
}
dependencies {
compile (
'io.dropwizard:dropwizard-core:' + dropwizardVersion,
'io.dropwizard:dropwizard-hibernate:' + dropwizardVersion,
'io.dropwizard:dropwizard-migrations:' + dropwizardVersion,
'io.dropwizard:dropwizard-auth:' + dropwizardVersion
)
}
// Configure the oneJar task
task fatJar(type: OneJar) {
mainClass = mainClassName
}
// Copy fat jar to docker directory
task copyFatJar(type: Copy, dependsOn: fatJar) {
from 'build/libs'
into 'src/main/docker'
rename '([^-]+)-(.+)', '$1.jar'
include '**/*-standalone.jar'
}
build.finalizedBy copyFatJar