Advanced-Portals/core/build.gradle

47 lines
1.8 KiB
Groovy

apply plugin: 'maven-publish'
apply plugin: 'idea'
apply plugin: 'eclipse'
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/" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
// includeLibs just says to include the library in the final jar
dependencies {
includeLibs group: 'com.google.code.gson', name: 'gson', version: '2.8.9'
implementation group: 'com.google.code.gson', name: 'gson', version:'2.8.9'
includeLibs group: 'com.google.inject', name: 'guice', version:'5.0.1'
implementation group: 'com.google.inject', name: 'guice', version:'5.0.1'
implementation group: 'org.yaml', name: 'snakeyaml', version: '2.2'
includeLibs group: 'org.yaml', name: 'snakeyaml', version: '2.2'
implementation group: 'com.google.guava', name: 'guava', version: '33.2.0-jre'
implementation group: 'io.netty', name: 'netty-buffer', version: '4.1.109.Final'
implementation group: 'io.netty', name: 'netty-codec', version: '4.1.109.Final'
}
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
tasks.register('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}"
}
}
}