chore(ci): add server run task

This commit is contained in:
Sekwah 2022-05-04 01:17:54 +01:00
parent c1ed93203c
commit 81f78a213b
No known key found for this signature in database
GPG Key ID: 9E0D654FC942286D
1 changed files with 43 additions and 13 deletions

View File

@ -1,4 +1,22 @@
buildscript {
repositories {
maven {url "https://plugins.gradle.org/m2/"}
mavenCentral()
mavenLocal()
}
dependencies {
classpath "org.apache.httpcomponents:httpmime:4.5.13"
classpath "com.google.code.gson:gson:2.8.6"
classpath "org.apache.httpcomponents:httpclient:4.5.13"
}
}
plugins {
id 'dev.s7a.gradle.minecraft.server' version '1.1.0'
}
allprojects {
apply plugin: 'java'
@ -17,19 +35,6 @@ allprojects {
targetCompatibility = 1.8
}
buildscript {
repositories {
maven {url "https://plugins.gradle.org/m2/"}
mavenCentral()
mavenLocal()
}
dependencies {
classpath "org.apache.httpcomponents:httpmime:4.5.13"
classpath "com.google.code.gson:gson:2.8.6"
classpath "org.apache.httpcomponents:httpclient:4.5.13"
}
}
apply from: 'env-variables.gradle'
archivesBaseName = "Advanced-Portals"
@ -78,4 +83,29 @@ jar {
println("Will Include: ${it.name}")
it.isDirectory() ? it : zipTree(it)
}
}
minecraftServerConfig {
jarUrl.set('https://download.getbukkit.org/spigot/spigot-1.18.2.jar')
jvmArgument = ["-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005", "-DIReallyKnowWhatIAmDoingISwear=true"]
}
task copyPlugin() {
doLast {
copy {
println "$buildDir/libs/Advanced-Portals-${getVersion()}.jar"
println "$buildDir/MinecraftServer/plugins/Advanced-Portals-${getVersion()}.jar"
try {
delete fileTree("$buildDir/MinecraftServer/plugins/") {
include "*.jar"
}
}
catch (RuntimeException e) {
println e.getLocalizedMessage()
}
from file("$buildDir/libs/Advanced-Portals-${getVersion()}.jar")
into file("$buildDir/MinecraftServer/plugins")
}
}
}