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
|
|
|
|
2019-01-29 11:49:43 +01:00
|
|
|
archivesBaseName = "advancedportals"
|
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:54:52 +02:00
|
|
|
options.encoding = 'UTF-8'
|
2018-06-03 09:13:21 +02:00
|
|
|
}
|
|
|
|
|
2018-06-04 12:54:52 +02:00
|
|
|
configurations {
|
|
|
|
// configuration that holds jars to copy into lib
|
|
|
|
includeLibs
|
|
|
|
}
|
|
|
|
|
2018-06-07 00:10:52 +02:00
|
|
|
repositories {
|
2020-06-28 23:44:20 +02:00
|
|
|
maven { url "https://repo.maven.apache.org/maven2" }
|
2018-06-07 00:10:52 +02:00
|
|
|
maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" }
|
2020-06-28 23:44:20 +02:00
|
|
|
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
|
2019-01-29 11:49:43 +01:00
|
|
|
}
|
|
|
|
|
2018-06-04 12:54:52 +02:00
|
|
|
// includeLibs just says to include the library in the final jar
|
2018-06-03 09:13:21 +02:00
|
|
|
dependencies {
|
2018-06-04 12:54:52 +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:54:52 +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'
|
2019-01-29 11:49:43 +01:00
|
|
|
|
2020-06-28 23:22:13 +02:00
|
|
|
// For spigot api
|
2020-06-28 23:44:20 +02:00
|
|
|
implementation "org.spigotmc:spigot-api:1.16.1-R0.1-SNAPSHOT"
|
2019-01-29 11:49:43 +01:00
|
|
|
|
2020-06-28 23:22:13 +02:00
|
|
|
// For bukkit api
|
|
|
|
implementation "net.md-5:bungeecord-api:1.15-SNAPSHOT"
|
2018-06-03 09:13:21 +02:00
|
|
|
}
|
2018-06-04 05:47:35 +02:00
|
|
|
|
2018-06-04 12:54:52 +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-06 16:02:28 +02:00
|
|
|
task runJar() {
|
|
|
|
doLast {
|
|
|
|
javaexec {
|
|
|
|
main "-jar"
|
|
|
|
args "${System.env.MC_SERVER_LOC}\\${System.env.MC_SERVER_JAR}.jar"
|
2018-08-26 03:48:27 +02:00
|
|
|
jvmArgs = ["-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005", "-DIReallyKnowWhatIAmDoingISwear=true"]
|
2018-06-06 16:02:28 +02:00
|
|
|
workingDir "${System.env.MC_SERVER_LOC}"
|
|
|
|
}
|
2018-06-04 05:47:35 +02:00
|
|
|
}
|
2018-06-07 00:00:58 +02:00
|
|
|
}
|
|
|
|
|
2019-01-29 11:49:43 +01:00
|
|
|
|
|
|
|
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
|
|
|
// if it is present.
|
|
|
|
// If you remove this task, sources will not be generated.
|
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
|
|
classifier = 'sources'
|
|
|
|
from sourceSets.main.allSource
|
|
|
|
}
|