Use gradle as a build tool
This commit is contained in:
parent
5b68a0cbb7
commit
2ce84244e8
|
|
@ -59,11 +59,7 @@ public class DatabaseConnection {
|
||||||
public static Connection getConnection() {
|
public static Connection getConnection() {
|
||||||
try {
|
try {
|
||||||
instance.openConnection();
|
instance.openConnection();
|
||||||
}
|
} catch (Exception e) {
|
||||||
catch (SQLException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
catch (Exception e){
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,14 +33,22 @@ dependencies {
|
||||||
// implementation(project(":api"))
|
// implementation(project(":api"))
|
||||||
implementation(project(":galaxy"))
|
implementation(project(":galaxy"))
|
||||||
implementation(project(":velocity"))
|
implementation(project(":velocity"))
|
||||||
implementation("net.kyori", "adventure-text-minimessage", "4.1.0-SNAPSHOT")
|
// implementation("net.kyori", "adventure-text-minimessage", "4.1.0-SNAPSHOT") {
|
||||||
implementation("org.spongepowered", "configurate-yaml", "4.1.2")
|
// exclude("net.kyori")
|
||||||
|
// exclude("net.kyori.examination")
|
||||||
|
// }
|
||||||
|
// implementation("org.spongepowered", "configurate-yaml", "4.1.2")
|
||||||
|
// implementation("mysql:mysql-connector-java:8.0.27") // mysql
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
|
|
||||||
shadowJar {
|
shadowJar {
|
||||||
archiveFileName.set("${project.name}-${project.version}.jar")
|
archiveFileName.set("${project.name}-${project.version}.jar")
|
||||||
|
minimize() {
|
||||||
|
exclude { it.moduleName == "galaxy" }
|
||||||
|
exclude { it.moduleName == "velocity" }
|
||||||
|
}
|
||||||
listOf(
|
listOf(
|
||||||
"net.kyori.adventure.text.minimessage",
|
"net.kyori.adventure.text.minimessage",
|
||||||
"org.spongepowered.configurate"
|
"org.spongepowered.configurate"
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,23 @@
|
||||||
plugins {
|
plugins {
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
|
id("com.github.johnrengelman.shadow")
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(project(":api")) // API
|
implementation(project(":api")) // API
|
||||||
compileOnly("com.alttd:Galaxy-API:1.18.1-R0.1-SNAPSHOT") // Galaxy
|
compileOnly("com.alttd:Galaxy-API:1.18.1-R0.1-SNAPSHOT") // Galaxy
|
||||||
compileOnly("com.gitlab.ruany:LiteBansAPI:0.3.5")
|
compileOnly("com.gitlab.ruany:LiteBansAPI:0.3.5")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks {
|
||||||
|
|
||||||
|
shadowJar {
|
||||||
|
archiveFileName.set("${project.name}-${project.version}.jar")
|
||||||
|
// minimize()
|
||||||
|
}
|
||||||
|
|
||||||
|
build {
|
||||||
|
dependsOn(shadowJar)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,33 @@
|
||||||
plugins {
|
plugins {
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
|
id("com.github.johnrengelman.shadow")
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(project(":api")) // API
|
implementation(project(":api")) // API
|
||||||
compileOnly("com.velocitypowered:velocity-api:3.0.0") // Velocity
|
compileOnly("com.velocitypowered:velocity-api:3.0.0") // Velocity
|
||||||
annotationProcessor("com.velocitypowered:velocity-api:3.0.0")
|
annotationProcessor("com.velocitypowered:velocity-api:3.0.0")
|
||||||
implementation("mysql:mysql-connector-java:8.0.23") // mysql
|
implementation("mysql:mysql-connector-java:8.0.27") // mysql
|
||||||
compileOnly("net.kyori:adventure-text-minimessage:4.1.0-SNAPSHOT") // Minimessage
|
implementation("org.spongepowered", "configurate-yaml", "4.1.2")
|
||||||
|
implementation("net.kyori", "adventure-text-minimessage", "4.1.0-SNAPSHOT") {
|
||||||
|
exclude("net.kyori")
|
||||||
|
exclude("net.kyori.examination")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks {
|
||||||
|
|
||||||
|
shadowJar {
|
||||||
|
archiveFileName.set("${project.name}-${project.version}.jar")
|
||||||
|
// minimize()
|
||||||
|
listOf(
|
||||||
|
"net.kyori.adventure.text.minimessage",
|
||||||
|
"org.spongepowered.configurate"
|
||||||
|
).forEach { relocate(it, "${rootProject.group}.lib.$it") }
|
||||||
|
}
|
||||||
|
|
||||||
|
build {
|
||||||
|
dependsOn(shadowJar)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user