@@ -36,143 +36,143 @@ mainClassName = "lavalink.server.Launcher"
36
36
version = " ${ versionFromTag()} " . toString()
37
37
38
38
ext {
39
- moduleName = ' Lavalink-Server'
39
+ moduleName = ' Lavalink-Server'
40
40
}
41
41
42
42
bootJar {
43
- archiveFileName = " Lavalink.jar"
43
+ archiveFileName = " Lavalink.jar"
44
44
}
45
45
46
46
sourceCompatibility = targetCompatibility = 11
47
47
48
48
run {
49
- // compiling tests during bootRun increases the likelihood of catching broken tests locally instead of on the CI
50
- dependsOn compileTestJava
51
-
52
- // pass in custom jvm args
53
- // source: https://stackoverflow.com/a/25079415
54
- // example: ./gradlew bootRun -PjvmArgs="--illegal-access=debug -Dwhatever=value"
55
- if (project. hasProperty(' jvmArgs' )) {
56
- jvmArgs project. jvmArgs. split(' \\ s+' )
57
- }
49
+ // compiling tests during bootRun increases the likelihood of catching broken tests locally instead of on the CI
50
+ dependsOn compileTestJava
51
+
52
+ // pass in custom jvm args
53
+ // source: https://stackoverflow.com/a/25079415
54
+ // example: ./gradlew bootRun -PjvmArgs="--illegal-access=debug -Dwhatever=value"
55
+ if (project. hasProperty(' jvmArgs' )) {
56
+ jvmArgs project. jvmArgs. split(' \\ s+' )
57
+ }
58
58
}
59
59
60
60
dependencies {
61
- implementation group : ' org.jetbrains.kotlin' , name : ' kotlin-reflect' , version : kotlinVersion
62
-
63
- // Audio Sending
64
- implementation group : " com.sedmelluq" , name : " udp-queue" , version : udpQueueVersion
65
- implementation(group : ' moe.kyokobot.koe' , name : ' ext-udpqueue' , version : koeVersion) {
66
- exclude group : " com.sedmelluq" , module : " lavaplayer"
67
- exclude group : " com.sedmelluq" , module : " udp-queue"
68
- }
69
- implementation(group : ' moe.kyokobot.koe' , name : ' core' , version : koeVersion) {
70
- // This version of SLF4J does not recognise Logback 1.2.3
71
- exclude group : " org.slf4j" , module : " slf4j-api"
72
- exclude group : " com.sedmelluq" , module : " lavaplayer"
73
- }
74
-
75
- // Transport
76
- implementation " io.netty:netty-transport-native-epoll:$nettyEpollVersion :linux-x86_64"
77
-
78
- // Audio Player
79
- implementation group : ' com.sedmelluq' , name : ' lavaplayer' , version : lavaplayerVersion
80
- implementation(group : ' com.sedmelluq' , name : ' lavaplayer-ext-youtube-rotator' , version : lavaplayerIpRotatorVersion) {
81
- exclude group : " com.sedmelluq" , module : " lavaplayer"
82
- }
83
-
84
- // Filters
85
- implementation(group : ' com.github.natanbc' , name : ' lavadsp' , version : lavaDspVersion) {
86
- exclude group : " com.sedmelluq" , module : " lavaplayer"
87
- }
88
-
89
- // Spring
90
- implementation group : ' org.springframework' , name : ' spring-websocket' , version : springWebSocketVersion
91
- implementation(group : ' org.springframework.boot' , name : ' spring-boot-starter-web' , version : springBootVersion) {
92
- exclude group : ' org.springframework.boot' , module : ' spring-boot-starter-tomcat'
93
- }
94
- implementation group : ' org.springframework.boot' , name : ' spring-boot-starter-undertow' , version : springBootVersion
95
-
96
- // Logging and Statistics
97
- implementation group : ' ch.qos.logback' , name : ' logback-classic' , version : logbackVersion
98
- implementation group : ' io.sentry' , name : ' sentry-logback' , version : sentryLogbackVersion
99
- implementation group : ' io.prometheus' , name : ' simpleclient' , version : prometheusVersion
100
- implementation group : ' io.prometheus' , name : ' simpleclient_hotspot' , version : prometheusVersion
101
- implementation group : ' io.prometheus' , name : ' simpleclient_logback' , version : prometheusVersion
102
- implementation group : ' io.prometheus' , name : ' simpleclient_servlet' , version : prometheusVersion
103
-
104
- // Native System Stuff
105
- implementation group : ' com.github.oshi' , name : ' oshi-core' , version : oshiVersion
106
-
107
- // idk Json
108
- implementation group : ' org.json' , name : ' json' , version : jsonOrgVersion
109
- implementation group : ' com.google.code.gson' , name : ' gson' , version : gsonVersion
110
-
111
- // Idk test stuff?
112
- compileOnly group : ' com.github.spotbugs' , name : ' spotbugs-annotations' , version : spotbugsAnnotationsVersion
113
- testImplementation group : ' org.springframework.boot' , name : ' spring-boot-starter-test' , version : springBootVersion
61
+ implementation group : ' org.jetbrains.kotlin' , name : ' kotlin-reflect' , version : kotlinVersion
62
+
63
+ // Audio Sending
64
+ implementation group : " com.sedmelluq" , name : " udp-queue" , version : udpQueueVersion
65
+ implementation(group : ' moe.kyokobot.koe' , name : ' ext-udpqueue' , version : koeVersion) {
66
+ exclude group : " com.sedmelluq" , module : " lavaplayer"
67
+ exclude group : " com.sedmelluq" , module : " udp-queue"
68
+ }
69
+ implementation(group : ' moe.kyokobot.koe' , name : ' core' , version : koeVersion) {
70
+ // This version of SLF4J does not recognise Logback 1.2.3
71
+ exclude group : " org.slf4j" , module : " slf4j-api"
72
+ exclude group : " com.sedmelluq" , module : " lavaplayer"
73
+ }
74
+
75
+ // Transport
76
+ implementation " io.netty:netty-transport-native-epoll:$nettyEpollVersion :linux-x86_64"
77
+
78
+ // Audio Player
79
+ // implementation group: 'com.sedmelluq', name: 'lavaplayer', version: lavaplayerVersion
80
+ implementation group : ' com.github.walkyst' , name : ' lavaplayer-fork' , version : ' 1.3.96'
81
+ implementation(group : ' com.sedmelluq' , name : ' lavaplayer-ext-youtube-rotator' , version : lavaplayerIpRotatorVersion) {
82
+ exclude group : " com.sedmelluq" , module : " lavaplayer"
83
+ }
84
+
85
+ // Filters
86
+ implementation(group : ' com.github.natanbc' , name : ' lavadsp' , version : lavaDspVersion) {
87
+ exclude group : " com.sedmelluq" , module : " lavaplayer"
88
+ }
89
+
90
+ // Spring
91
+ implementation group : ' org.springframework' , name : ' spring-websocket' , version : springWebSocketVersion
92
+ implementation(group : ' org.springframework.boot' , name : ' spring-boot-starter-web' , version : springBootVersion) {
93
+ exclude group : ' org.springframework.boot' , module : ' spring-boot-starter-tomcat'
94
+ }
95
+ implementation group : ' org.springframework.boot' , name : ' spring-boot-starter-undertow' , version : springBootVersion
96
+
97
+ // Logging and Statistics
98
+ implementation group : ' ch.qos.logback' , name : ' logback-classic' , version : logbackVersion
99
+ implementation group : ' io.sentry' , name : ' sentry-logback' , version : sentryLogbackVersion
100
+ implementation group : ' io.prometheus' , name : ' simpleclient' , version : prometheusVersion
101
+ implementation group : ' io.prometheus' , name : ' simpleclient_hotspot' , version : prometheusVersion
102
+ implementation group : ' io.prometheus' , name : ' simpleclient_logback' , version : prometheusVersion
103
+ implementation group : ' io.prometheus' , name : ' simpleclient_servlet' , version : prometheusVersion
104
+
105
+ // Native System Stuff
106
+ implementation group : ' com.github.oshi' , name : ' oshi-core' , version : oshiVersion
107
+
108
+ // idk Json
109
+ implementation group : ' org.json' , name : ' json' , version : jsonOrgVersion
110
+ implementation group : ' com.google.code.gson' , name : ' gson' , version : gsonVersion
111
+
112
+ // Idk test stuff?
113
+ compileOnly group : ' com.github.spotbugs' , name : ' spotbugs-annotations' , version : spotbugsAnnotationsVersion
114
+ testImplementation group : ' org.springframework.boot' , name : ' spring-boot-starter-test' , version : springBootVersion
114
115
}
115
116
116
117
processResources {
117
- // inject values into app.properties
118
- filesMatching(" **/app.properties" ) {
119
- filter ReplaceTokens , tokens : [
120
- " project.version" : project. version,
121
- " project.groupId" : project. group,
122
- " project.artifactId" : project. ext. moduleName,
123
- " env.BUILD_NUMBER" : (System . getenv(' CI' ) ? System . getenv(' BUILD_NUMBER' ) : ' Unofficial' ),
124
- " env.BUILD_TIME" : System . currentTimeMillis() + ' '
125
- ]
126
- }
118
+ // inject values into app.properties
119
+ filesMatching(" **/app.properties" ) {
120
+ filter ReplaceTokens , tokens : [
121
+ " project.version" : project. version,
122
+ " project.groupId" : project. group,
123
+ " project.artifactId" : project. ext. moduleName,
124
+ " env.BUILD_NUMBER" : (System . getenv(' CI' ) ? System . getenv(' BUILD_NUMBER' ) : ' Unofficial' ),
125
+ " env.BUILD_TIME" : System . currentTimeMillis() + ' '
126
+ ]
127
+ }
127
128
}
128
129
129
130
build {
130
- doLast {
131
- println ' Version: ' + version
132
- }
131
+ doLast {
132
+ println ' Version: ' + version
133
+ }
133
134
}
134
135
135
136
test {
136
- useJUnitPlatform()
137
+ useJUnitPlatform()
137
138
}
138
139
139
140
compileKotlin {
140
- kotlinOptions {
141
- jvmTarget = " 11"
142
- }
141
+ kotlinOptions {
142
+ jvmTarget = " 11"
143
+ }
143
144
}
144
145
145
146
compileTestKotlin {
146
- kotlinOptions {
147
- jvmTarget = " 11"
148
- }
147
+ kotlinOptions {
148
+ jvmTarget = " 11"
149
+ }
149
150
}
150
151
151
152
@SuppressWarnings (" GrMethodMayBeStatic" )
152
153
String versionFromTag () {
153
-
154
- def headTag = grgit. tag. list(). find {
155
- it. commit. getId() == grgit. head(). getId()
156
- }
157
-
158
- // Uncommitted changes? -> should be SNAPSHOT
159
- // Also watch out for false positives in the CI build
160
- def clean = grgit. status(). clean || System . getenv(' CI' ) != null
161
-
162
- if (! clean) {
163
- println (" Git state is dirty, setting version as snapshot" )
164
- }
165
-
166
- if (headTag && clean) {
167
- headTag. getName()
168
- } else {
169
- " ${ grgit.head().id} -SNAPSHOT"
170
- }
154
+ def headTag = grgit. tag. list(). find {
155
+ it. commit. getId() == grgit. head(). getId()
156
+ }
157
+
158
+ // Uncommitted changes? -> should be SNAPSHOT
159
+ // Also watch out for false positives in the CI build
160
+ def clean = grgit. status(). clean || System . getenv(' CI' ) != null
161
+
162
+ if (! clean) {
163
+ println (" Git state is dirty, setting version as snapshot" )
164
+ }
165
+
166
+ if (headTag && clean) {
167
+ headTag. getName()
168
+ } else {
169
+ " ${ grgit.head().id} -SNAPSHOT"
170
+ }
171
171
}
172
172
173
173
// create a simple version file that we will be reading to create appropriate docker tags
174
174
void versionTxt () {
175
- new File (" $projectDir /VERSION.txt" ). text = " $project . version \n "
175
+ new File (" $projectDir /VERSION.txt" ). text = " $project . version \n "
176
176
}
177
177
178
178
versionTxt()
0 commit comments