proxydiscordlink/build.gradle.kts

83 lines
2.0 KiB
Plaintext
Raw Normal View History

2021-12-26 13:02:47 +00:00
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
2021-09-11 17:14:34 +00:00
plugins {
2021-09-22 15:37:58 +00:00
java
2021-09-22 18:30:05 +00:00
`maven-publish`
2021-12-26 13:02:47 +00:00
id("com.github.johnrengelman.shadow") version "7.1.0"
2021-09-11 17:14:34 +00:00
}
2021-12-26 13:02:47 +00:00
group = "com.alttd.proxydiscordlink"
version = "1.0.0-BETA-SNAPSHOT"
description = "A velocity plugin to link Discord and Minecraft accounts."
2021-09-11 17:14:34 +00:00
2021-12-26 13:02:47 +00:00
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
2021-09-11 17:14:34 +00:00
}
2021-12-26 13:02:47 +00:00
}
2021-09-11 17:14:34 +00:00
2021-12-26 13:02:47 +00:00
tasks {
withType<JavaCompile> {
options.encoding = Charsets.UTF_8.name()
options.release.set(17)
}
2021-09-11 17:14:34 +00:00
2021-12-26 13:02:47 +00:00
withType<Javadoc> {
options.encoding = Charsets.UTF_8.name()
}
shadowJar {
dependsOn(getByName("relocateJars") as ConfigureShadowRelocation)
archiveFileName.set("${project.name}-${project.version}.jar")
minimize()
configurations = listOf(project.configurations.shadow.get())
}
build {
dependsOn(shadowJar)
}
create<ConfigureShadowRelocation>("relocateJars") {
target = shadowJar.get()
prefix = "${project.name}.lib"
2021-09-11 17:14:34 +00:00
}
}
2021-12-26 13:02:47 +00:00
2021-09-11 17:14:34 +00:00
dependencies {
2021-12-26 13:02:47 +00:00
// Minimessage // TODO : update all usages to 4.2
shadow("net.kyori:adventure-text-minimessage:4.2.0-SNAPSHOT") {
exclude("net.kyori", "adventure-api")
2021-09-22 15:37:58 +00:00
}
2021-09-11 17:14:34 +00:00
// Velocity
2021-12-26 13:02:47 +00:00
compileOnly("com.velocitypowered:velocity-api:3.0.1")
annotationProcessor("com.velocitypowered:velocity-api:3.0.1")
2021-09-11 17:14:34 +00:00
// JDA
2021-12-26 13:02:47 +00:00
shadow("net.dv8tion:JDA:5.0.0-alpha.3") {
2021-09-11 17:14:34 +00:00
exclude("opus-java") // exclude audio
}
// LuckPerms
compileOnly("net.luckperms:api:5.3")
// MySQL
2021-12-26 13:02:47 +00:00
shadow("mysql:mysql-connector-java:8.0.25")
2021-09-17 06:37:30 +00:00
// ShutdownInfo
2021-09-20 21:00:45 +00:00
compileOnly("com.alttd:ShutdownInfo:1.0")
2021-09-11 17:14:34 +00:00
}
2021-09-22 18:30:05 +00:00
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}
repositories{
maven {
name = "maven"
2021-12-26 13:02:47 +00:00
url = uri("https://repo.destro.xyz/snapshots")
2021-09-22 18:30:05 +00:00
credentials(PasswordCredentials::class)
}
}
}