- Full refactoring: max 200 lines/file, max 3 files/dir, KISS/DRY/SOLID - Lavalink client 3.4.0 + LavaSrc plugin (Spotify, Apple Music, Deezer) - 3-bot architecture: main (!), music (q!), radio (r!) - Filters: bassboost, nightcore, vaporwave, equalizer - Slash commands for music (/play, /skip, etc.) - Persistent queue in SQLite, auto-leave timer - Radio manager with auto-reconnect - Custom welcome GIF greetings via nekos.life - JDA 5.6.1, gson 2.14, hikaricp 6.3, all deps updated - Fixed YouTube playback via ytmsearch (LavaSrc) - CI/CD: Docker publish + release workflows - SpotBugs: all real bugs fixed, ignoreFailures=false - Checkstyle: Google Style (adapted), 0 violations
80 lines
1.7 KiB
Groovy
80 lines
1.7 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'application'
|
|
id 'checkstyle'
|
|
alias(libs.plugins.spotbugs)
|
|
id 'com.diffplug.spotless' version '6.25.0'
|
|
}
|
|
|
|
group = 'creator.loki'
|
|
version = '1.0.0'
|
|
|
|
dependencies {
|
|
implementation(libs.jda) {
|
|
exclude module: 'opus-java'
|
|
}
|
|
implementation libs.lavaplayer
|
|
implementation libs.lavalink.client
|
|
implementation libs.dotenv
|
|
implementation libs.slf4j.api
|
|
implementation libs.logback.classic
|
|
implementation libs.gson
|
|
implementation libs.caffeine
|
|
implementation libs.guice
|
|
implementation libs.sqlite.jdbc
|
|
implementation libs.hikaricp
|
|
|
|
testImplementation libs.junit.jupiter
|
|
testImplementation libs.mockito.core
|
|
testImplementation libs.mockito.junit.jupiter
|
|
testRuntimeOnly libs.junit.platform.launcher
|
|
}
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_21
|
|
targetCompatibility = JavaVersion.VERSION_21
|
|
}
|
|
|
|
tasks.withType(JavaCompile) {
|
|
options.encoding = 'UTF-8'
|
|
options.compilerArgs << '-Xlint:all'
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
application {
|
|
mainClass = 'creator.loki.bootstrap.App'
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes(
|
|
'Main-Class': 'creator.loki.bootstrap.App'
|
|
)
|
|
}
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
from {
|
|
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
|
}
|
|
}
|
|
|
|
spotless {
|
|
java {
|
|
googleJavaFormat()
|
|
importOrder('java', 'javax', '')
|
|
removeUnusedImports()
|
|
trimTrailingWhitespace()
|
|
endWithNewline()
|
|
}
|
|
}
|
|
|
|
checkstyle {
|
|
configFile = file("${rootDir}/config/checkstyle/checkstyle.xml")
|
|
}
|
|
|
|
spotbugs {
|
|
excludeFilter = file("${rootDir}/config/spotbugs/exclude.xml")
|
|
ignoreFailures = false
|
|
}
|