Upgraded multiple dependencies including Spring Boot, JDA, and Configurate to their latest versions. Updated Java toolchain to version 21. Added the Versions plugin for dependency version management. Modified Jenkins build process to use `shadowJar`.
86 lines
2.1 KiB
Plaintext
86 lines
2.1 KiB
Plaintext
|
|
plugins {
|
|
id("java")
|
|
id("com.github.johnrengelman.shadow") version "8.1.1"
|
|
id("maven-publish")
|
|
id("org.springframework.boot") version("3.5.3")
|
|
id("com.github.ben-manes.versions") version "0.52.0"
|
|
}
|
|
|
|
group = "com.alttd"
|
|
version = "1.0.0-SNAPSHOT"
|
|
description = "Altitude Discord Bot."
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion.set(JavaLanguageVersion.of(21))
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
create<MavenPublication>("mavenJava") {
|
|
from(components["java"])
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks {
|
|
withType<JavaCompile> {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
}
|
|
|
|
withType<Javadoc> {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
}
|
|
|
|
withType<Jar> {
|
|
manifest {
|
|
// attributes["Main-Class"] = "BOOT-INF/classes/${rootProject.group}.${project.name}"
|
|
attributes["Main-Class"] = "org.springframework.boot.loader.JarLauncher"
|
|
}
|
|
}
|
|
|
|
shadowJar {
|
|
archiveFileName.set(rootProject.name + ".jar")
|
|
manifest {
|
|
attributes["Main-Class"] = "org.springframework.boot.loader.JarLauncher"
|
|
}
|
|
}
|
|
|
|
build {
|
|
dependsOn(shadowJar)
|
|
}
|
|
|
|
jar {
|
|
enabled = false
|
|
}
|
|
|
|
}
|
|
|
|
dependencies {
|
|
// JDA
|
|
implementation("net.dv8tion:JDA:5.6.1") {
|
|
exclude("opus-java") // exclude audio
|
|
}
|
|
// MySQL
|
|
implementation("mysql:mysql-connector-java:8.0.33")
|
|
|
|
// Configurate
|
|
implementation("org.spongepowered:configurate-yaml:4.2.0")
|
|
|
|
// Excel
|
|
implementation("org.apache.poi:poi:5.4.1")
|
|
implementation("org.apache.poi:poi-ooxml:5.4.1")
|
|
// Other stuff?
|
|
compileOnly("org.projectlombok:lombok:1.18.38")
|
|
annotationProcessor("org.projectlombok:lombok:1.18.38")
|
|
implementation("com.alttd:AltitudeLogs:1.0")
|
|
implementation("org.springframework.boot:spring-boot-starter-web:3.5.3")
|
|
implementation("org.springframework.boot:spring-boot-starter-validation:3.5.3")
|
|
implementation("com.google.code.gson:gson:2.13.1")
|
|
|
|
testImplementation(platform("org.junit:junit-bom:5.13.1"))
|
|
testImplementation("org.junit.jupiter:junit-jupiter")
|
|
}
|