Make beta implementation use Project Poseidon from Maven, default to 1 tick refresh rate to avoid lag, fix tenkumaLib ConfigurationProvider usage in Main, switch from reflection to hybrid abstraction/reflection.
This commit is contained in:
parent
d624a46703
commit
029b37db7e
9 changed files with 100 additions and 242 deletions
|
|
@ -9,6 +9,7 @@ version = System.getenv("TKEEPER_VERSION_NAME") ?: "unknown"
|
|||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://repo.papermc.io/repository/maven-public/")
|
||||
maven("https://repository.johnymuffin.com/repository/maven-releases/")
|
||||
flatDir {
|
||||
dirs("libs")
|
||||
}
|
||||
|
|
@ -66,7 +67,7 @@ mcVersions.forEach { ver ->
|
|||
dependencies {
|
||||
add("compileOnly", "io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT")
|
||||
add("modernCompileOnly", "io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT")
|
||||
add("legacyCompileOnly", files("libs/tenkumaLib/libs/craftbukkit-1060.jar"))
|
||||
add("legacyImplementation", "com.legacyminecraft.poseidon:poseidon-craftbukkit:1.1.12-260503-0121-a9af58a")
|
||||
|
||||
compileOnly(project(":tenkumaLib"))
|
||||
|
||||
|
|
@ -76,7 +77,6 @@ dependencies {
|
|||
testImplementation("io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT")
|
||||
testImplementation("com.github.seeseemelk:MockBukkit-v1.21:3.102.0")
|
||||
|
||||
// Allow tests to see the versioned implementations
|
||||
mcVersions.forEach { ver ->
|
||||
testImplementation(sourceSets[ver].output)
|
||||
}
|
||||
|
|
@ -111,26 +111,26 @@ tasks.register("buildAll") {
|
|||
dependsOn(tasks.withType<Jar>())
|
||||
}
|
||||
|
||||
tasks.register<Jar>("bundleAll") {
|
||||
dependsOn(configurations.runtimeClasspath)
|
||||
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
|
||||
from(sourceSets["main"].output)
|
||||
|
||||
mcVersions.forEach { ver ->
|
||||
from(sourceSets[ver].output)
|
||||
}
|
||||
|
||||
from({
|
||||
configurations.runtimeClasspath.get()
|
||||
.filter { it.name.endsWith("jar") }
|
||||
.map { zipTree(it) }
|
||||
})
|
||||
|
||||
archiveClassifier.set("all-implementations")
|
||||
archiveVersion.set(project.version.toString())
|
||||
}
|
||||
//tasks.register<Jar>("bundleAll") {
|
||||
// dependsOn(configurations.runtimeClasspath)
|
||||
//
|
||||
// duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
//
|
||||
// from(sourceSets["main"].output)
|
||||
//
|
||||
// mcVersions.forEach { ver ->
|
||||
// from(sourceSets[ver].output)
|
||||
// }
|
||||
//
|
||||
// from({
|
||||
// configurations.runtimeClasspath.get()
|
||||
// .filter { it.name.endsWith("jar") }
|
||||
// .map { zipTree(it) }
|
||||
// })
|
||||
//
|
||||
// archiveClassifier.set("all-implementations")
|
||||
// archiveVersion.set(project.version.toString())
|
||||
//}
|
||||
|
||||
/* ----------------------------------------- */
|
||||
/* JAVA SETTINGS */
|
||||
|
|
@ -151,14 +151,34 @@ tasks.withType<JavaCompile> {
|
|||
tasks.runServer {
|
||||
minecraftVersion("1.21")
|
||||
|
||||
val bundleAll = tasks.named<Jar>("bundleAll")
|
||||
val modern = tasks.named<Jar>("jarModern")
|
||||
val tLibBundleAll = project(":tenkumaLib").tasks.named<Jar>("bundleAll")
|
||||
|
||||
dependsOn(bundleAll)
|
||||
dependsOn(modern)
|
||||
dependsOn(tLibBundleAll)
|
||||
|
||||
pluginJars(
|
||||
bundleAll.flatMap { it.archiveFile },
|
||||
modern.flatMap { it.archiveFile },
|
||||
tLibBundleAll.flatMap { it.archiveFile }
|
||||
)
|
||||
}
|
||||
|
||||
tasks.register<Copy>("copyLegacyPlugin") {
|
||||
from(project(":tenkumaLib").tasks.named<Jar>("bundleAll"))
|
||||
from(tasks.named<Jar>("jarLegacy"))
|
||||
into("runBeta/plugins")
|
||||
}
|
||||
|
||||
tasks.register<JavaExec>("runBetaServer") {
|
||||
group = "verification"
|
||||
description = "Runs the beta server with legacy TimeKeeper."
|
||||
|
||||
dependsOn("copyLegacyPlugin")
|
||||
|
||||
jvmArgs = listOf("-Djline.terminal=jline.UnsupportedTerminal", "-Dfile.encoding=UTF-8", "-Djava.awt.headless=true")
|
||||
classpath = files("runBeta/poseidon-craftbukkit.jar")
|
||||
mainClass.set("org.bukkit.craftbukkit.Main")
|
||||
workingDir = file("runBeta")
|
||||
|
||||
standardInput = file("/dev/null").inputStream()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue