-
Notifications
You must be signed in to change notification settings - Fork 55
/
build.gradle
123 lines (103 loc) · 3.67 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
buildscript {
ext {
springBootVersion = '2.6.5'
}
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}")
}
}
plugins {
id 'java'
id 'idea'
id 'distribution'
id 'org.springframework.boot' version '2.6.5'
id 'application'
}
repositories {
mavenCentral()
maven {
name 'm2-dv8tion'
url 'https://m2.dv8tion.net/releases'
}
maven {
url 'https://jitpack.io'
}
maven {
url "https://m2.chew.pro/releases"
}
}
processResources {
filesMatching('application.yml') {
expand(project.properties)
}
}
test {
useJUnitPlatform()
}
mainClassName = 'net.dirtydeeds.discordsoundboard.MainController'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
tasks.named("bootJar") {
manifest {
attributes 'Implementation-Title': rootProject.name,
'Implementation-Version': projectVersion
}
}
dependencies {
implementation 'net.dv8tion:JDA:5.0.0-beta.6'
implementation 'com.github.walkyst:lavaplayer-fork:1.4.0'
implementation 'com.github.aikaterna:lavaplayer-natives:original-SNAPSHOT'
implementation 'pw.chew:jda-chewtils:1.24.1'
implementation group: 'commons-io', name: 'commons-io', version: '2.11.0'
implementation 'ch.qos.logback:logback-classic:1.2.11'
compileOnly 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.6.5'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-jersey', version: '2.6.5'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-jdbc', version: '2.6.5'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: '2.6.5'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-rest', version: '2.6.6'
implementation group: 'com.h2database', name: 'h2', version: '1.4.200'
implementation group: 'org.springdoc', name: 'springdoc-openapi-ui', version: '1.6.6'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.8.2'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
testImplementation "org.mockito:mockito-core:4.4.0"
testImplementation 'org.mockito:mockito-junit-jupiter:4.4.0'
testCompileOnly 'org.projectlombok:lombok:1.18.22'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
}
processResources {
exclude 'app.properties'
}
bootJar {
exclude ("application.properties")
}
//Run tasks -> distributions -> assembleBootDist to create a release zip
bootDistZip {
archiveFileName = 'DiscordSoundboard.zip'
into ("DiscordSoundboard/bin") {
from ('src/main/resources/application.properties.example')
from ("$buildDir/resources/main/application.yml")
}
into("DiscordSoundboard/bin/static") {
from('src/main/webapp')
}
into("DiscordSoundboard/bin/sounds") {
from('sounds')
}
rename { String fileName ->
fileName.replace('application.properties.example', 'application.properties') }
}
task renameDist {
doLast {
new File("$buildDir/distributions/DiscordSoundboard.zip")
.renameTo("$buildDir/distributions/DiscordSoundboard-"+projectVersion+".zip")
}
}
bootDistZip.finalizedBy renameDist