Skip to content

Instantly share code, notes, and snippets.

@mattmess1221
Last active July 2, 2020 23:26
Show Gist options
  • Save mattmess1221/c86e92f7b81af57ae4499712b5c57659 to your computer and use it in GitHub Desktop.
Save mattmess1221/c86e92f7b81af57ae4499712b5c57659 to your computer and use it in GitHub Desktop.
Run config for spongevanilla
plugins {
id 'java-library'
}
repositories {
jcenter()
maven {
name = "SpongeMaven"
url = "https://repo.spongepowered.org/maven"
}
}
configurations {
runtime {
exclude group: 'org.spongepowered', module: 'spongeapi'
}
server {
transitive = false
}
}
dependencies {
api 'org.spongepowered:spongeapi:7.2.0'
server 'org.spongepowered:spongevanilla:1.12.2-7.2.4-RC375'
}
task runServer(type: JavaExec) {
// the run directory
workingDir 'run'
// scan the full classpath for plugin dependencies
// can be changed to --scan-classpath if there are no plugin dependencies
args += ['--scan-full-classpath']
// memory and other jvm args
jvmArgs += ['-Xmx2g', '-Xms2g']
// required for starting the server
classpath = configurations.server + sourceSets.main.runtimeClasspath
main = 'org.spongepowered.server.launch.VanillaServerMain'
standardInput = System.in
doFirst {
// makes sure the run directory exists
workingDir.mkdirs()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment