Advanced-Portals/spigot/build.gradle
Sekwah dcb4463de9 Removing everything preparing for re-code.
Sorry in advance for any mess with this part. Setting up a project from the get go I am not sure how to follow the commit structure as easily as I jump around a bit. Once we have some structure ready or planned out I will be following the standards we put back in place.
2024-11-18 05:32:21 +00:00

42 lines
1.2 KiB
Groovy

tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
configurations {
// configuration that holds jars to copy into lib
includeLibs
}
repositories {
maven { url "https://repo.maven.apache.org/maven2" }
maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" }
}
// includeLibs just says to include the library in the final jar
dependencies {
implementation project(":core")
// For spigot api
implementation "org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT"
}
jar {
from configurations.includeLibs.collect {
it.isDirectory() ? it : zipTree(it)
}
}
// Set SPIGOT_LOC to the location of your server and SPIGOT_JAR as the name of the jar file in the server you want to run
// DIReallyKnowWhatIAmDoingISwear is to remove the stupid pause spigot has at the start
task runJar() {
doLast {
javaexec {
main "-jar"
args "${System.env.MC_SERVER_LOC}\\${System.env.MC_SERVER_JAR}.jar"
jvmArgs = ["-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005", "-DIReallyKnowWhatIAmDoingISwear=true"]
workingDir "${System.env.MC_SERVER_LOC}"
}
}
}