forked from Darkside138/DiscordSoundboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
101 lines (85 loc) · 2.58 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'distribution'
apply plugin: 'spring-boot'
version = '1.4.8'
sourceCompatibility = 1.8
targetCompatibility = 1.8
buildscript {
ext {
springBootVersion = '1.3.3.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.springframework.boot:spring-boot-starter-web:${springBootVersion}")
classpath("org.springframework.boot:spring-boot-starter-jersey:${springBootVersion}")
}
}
repositories {
repositories {
jcenter()
mavenCentral()
}
}
dependencies {
compile 'net.dv8tion:JDA:2.2.1_353'
compile 'net.dv8tion:jda-player:0.2.1_9'
compile 'commons-io:commons-io:2.4'
compile 'org.springframework.boot:spring-boot-starter-web'
compile 'org.springframework.boot:spring-boot-starter-jersey'
compile("org.springframework.boot:spring-boot-starter-data-jpa")
compile("com.h2database:h2")
compile "io.springfox:springfox-swagger2:2.4.0"
compile 'io.springfox:springfox-swagger-ui:2.4.0'
testCompile 'org.springframework.boot:spring-boot-starter-test'
}
processResources {
exclude 'app.properties'
}
jar {
group = 'build'
manifest {
attributes 'Main-Class': 'net.dirtydeeds.discordsoundboard.MainController',
'Implementation-Version': version
}
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
jar.into('static') {
from('src/main/webapp')
}
exclude('/src/main/java/**')
exclude("/src/main/resources/*")
}
def distributionsCopySpec = copySpec {
def baseName = "${jar.baseName}"
def fileName = "${baseName}-$version"
from file("$buildDir/libs")
from file("$buildDir/resources/main")
include "**/app.properties.example"
from file("/distFiles")
include "soundboard.bat"
include "ffmpeg.exe"
include "ffprobe.exe"
include "youtube-dl"
include "avatar.jpg"
include "${fileName}.jar"
exclude 'app.properties'
rename ("app.properties.example", "app.properties")
rename "${fileName}.jar", "${baseName}.jar"
}
task zip(type: Zip, dependsOn: 'bootRepackage') {
def fileName = "${baseName}-$version"
with distributionsCopySpec
archiveName "${fileName}.zip"
}
task tar(type: Tar, dependsOn: 'bootRepackage') {
def fileName = "${baseName}-$version"
with distributionsCopySpec
archiveName "${fileName}.tar"
}
build.dependsOn(zip,tar)
task wrapper(type: Wrapper) {
gradleVersion = '2.3'
}