Updated the shadowJar configuration to output the JAR file as ProxyDiscordLink.jar instead of discordLink.jar. This change clarifies the file's purpose and aligns with naming conventions.
94 lines
2.2 KiB
Plaintext
94 lines
2.2 KiB
Plaintext
plugins {
|
|
`java`
|
|
`maven-publish`
|
|
id("com.gradleup.shadow") version "9.0.0-beta4"
|
|
}
|
|
|
|
allprojects {
|
|
group = "com.alttd.proxydiscordlink"
|
|
description = "A velocity plugin to link Discord and Minecraft accounts."
|
|
|
|
apply(plugin = "java")
|
|
apply(plugin = "maven-publish")
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion.set(JavaLanguageVersion.of(21))
|
|
}
|
|
}
|
|
|
|
tasks {
|
|
withType<JavaCompile> {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
options.release.set(21)
|
|
}
|
|
|
|
withType<Javadoc> {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
dependencies {
|
|
// Minimessage
|
|
// implementation("net.kyori:adventure-text-minimessage:4.1.0-SNAPSHOT")
|
|
// Velocity
|
|
compileOnly("com.velocitypowered:velocity-api:3.1.2-SNAPSHOT") // Velocity
|
|
annotationProcessor("com.velocitypowered:velocity-api:3.1.2-SNAPSHOT")
|
|
// JDA
|
|
implementation("net.dv8tion:JDA:5.0.0-beta.2") {
|
|
shadow("net.dv8tion:JDA:5.0.0-beta.2") {
|
|
exclude("opus-java") // exclude audio
|
|
}
|
|
compileOnly("com.gitlab.ruany:LitebansAPI:0.3.5")
|
|
// LuckPerms
|
|
compileOnly("net.luckperms:api:5.3")
|
|
// MySQL
|
|
runtimeOnly("mysql:mysql-connector-java:8.0.23")
|
|
// ShutdownInfo
|
|
compileOnly("com.alttd:ShutdownInfo:1.0")
|
|
}
|
|
|
|
implementation("org.aarboard.nextcloud:nextcloud-api:13.1.0") //NextCloud
|
|
|
|
testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.0")
|
|
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0")
|
|
|
|
tasks {
|
|
|
|
|
|
shadowJar {
|
|
|
|
archiveFileName.set("ProxyDiscordLink.jar")
|
|
listOf(
|
|
"net.dv8tion.jda"
|
|
).forEach { relocate(it, "${rootProject.group}.lib.$it") }
|
|
}
|
|
|
|
build {
|
|
dependsOn(shadowJar)
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
create<MavenPublication>("mavenJava") {
|
|
from(components["java"])
|
|
}
|
|
}
|
|
|
|
repositories{
|
|
maven {
|
|
name = "maven"
|
|
url = uri("https://repo.destro.xyz/snapshots")
|
|
credentials(PasswordCredentials::class)
|
|
}
|
|
}
|
|
} |