-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
72 lines (58 loc) · 1.82 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
apply plugin: 'java'
apply plugin: 'application'
group 'com.backbase.homeassignment'
mainClassName = "com.backbase.kalah.Kalah"
repositories {
mavenCentral()
}
dependencies {
testCompile 'junit:junit:4.12'
testCompile 'org.jmockit:jmockit:1.39'
compile 'org.springframework.boot:spring-boot-starter-websocket:1.5.4.RELEASE'
compile 'org.springframework.boot:spring-boot-starter-undertow:1.5.4.RELEASE'
compile 'io.springfox:springfox-swagger2:2.9.2'
}
compileJava {
options.encoding = 'UTF-8'
}
jar {
baseName = project.name
archiveName = baseName + '.jar'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
manifest {
attributes 'Implementation-Title': project.name,
'Main-Class': mainClassName,
'Class-Path': '../conf/ ' + configurations.compile.collect {'../lib/' + it.getName()}.join(' ')
exclude ('**/*.properties')
exclude ('**/*.xml')
}
}
distributions {
main {
contents {
eachFile {
details -> if ((details.name == project.name || details.name == project.name + '.bat') || (details.name == jar.archiveName && details.relativePath.toString().contains('lib/'))) {
details.exclude()
}
}
from(jar) {
into "bin"
}
from('src/main/resources') {
into "conf"
}
from('scripts') {
into "bin"
filter {
line -> line.replace('{project.name}', project.name).replace('{jar.name}', project.name)
}
fileMode 775
}
from('doc/CHANGELOG.md') {
into ""
fileMode 444
}
}
}
}