2018-06-03 09:13:21 +02:00
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'maven'
|
2018-06-03 12:17:28 +02:00
|
|
|
apply plugin: 'idea'
|
|
|
|
apply plugin: 'eclipse'
|
2018-06-03 09:13:21 +02:00
|
|
|
|
|
|
|
group = 'com.sekwah.advancedportals'
|
|
|
|
version = '1.0.0'
|
|
|
|
|
|
|
|
description = ""
|
|
|
|
|
|
|
|
sourceCompatibility = 1.8
|
|
|
|
targetCompatibility = 1.8
|
|
|
|
|
|
|
|
tasks.withType(JavaCompile) {
|
2018-06-04 12:59:23 +02:00
|
|
|
options.encoding = 'UTF-8'
|
2018-06-03 09:13:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
maven { url "http://repo.maven.apache.org/maven2" }
|
|
|
|
}
|
2018-06-04 12:59:23 +02:00
|
|
|
|
|
|
|
configurations {
|
|
|
|
// configuration that holds jars to copy into lib
|
|
|
|
includeLibs
|
|
|
|
}
|
|
|
|
|
|
|
|
// includeLibs just says to include the library in the final jar
|
2018-06-03 09:13:21 +02:00
|
|
|
dependencies {
|
2018-06-04 12:59:23 +02:00
|
|
|
includeLibs group: 'com.google.code.gson', name: 'gson', version:'2.8.2'
|
2018-06-03 09:13:21 +02:00
|
|
|
compile group: 'com.google.code.gson', name: 'gson', version:'2.8.2'
|
2018-06-04 12:59:23 +02:00
|
|
|
includeLibs group: 'com.google.inject', name: 'guice', version:'4.0'
|
2018-06-03 09:13:21 +02:00
|
|
|
compile group: 'com.google.inject', name: 'guice', version:'4.0'
|
|
|
|
}
|
2018-06-04 05:47:35 +02:00
|
|
|
|
2018-06-04 12:59:23 +02:00
|
|
|
jar {
|
|
|
|
from configurations.includeLibs.collect { it.isDirectory() ? it : zipTree(it) }
|
|
|
|
}
|
|
|
|
|
2018-06-04 05:47:35 +02:00
|
|
|
|
|
|
|
// 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
|
2018-06-04 12:59:23 +02:00
|
|
|
// DIReallyKnowWhatIAmDoingISwear is to remove the stupid pause spigot has at the start
|
2018-06-04 05:47:35 +02:00
|
|
|
task runJar() << {
|
|
|
|
javaexec {
|
2018-06-04 12:59:23 +02:00
|
|
|
main "-jar"
|
|
|
|
args "${System.env.MC_SERVER_LOC}\\${System.env.MC_SERVER_JAR}.jar"
|
|
|
|
jvmArgs "-DIReallyKnowWhatIAmDoingISwear=true"
|
|
|
|
workingDir "${System.env.MC_SERVER_LOC}"
|
2018-06-04 05:47:35 +02:00
|
|
|
}
|
2018-06-04 12:59:23 +02:00
|
|
|
}
|