mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-05-22 04:21:21 +00:00
19b4da07b9
Adds run-paper plugin support as well as moves majority of logic to kotlin build scrips Co-authored-by: Josh Roy <10731363+JRoy@users.noreply.github.com>
29 lines
875 B
Plaintext
29 lines
875 B
Plaintext
plugins {
|
|
id("essentials.base-conventions")
|
|
id("xyz.jpenilla.run-paper")
|
|
}
|
|
|
|
val moduleExtension = extensions.create<EssentialsModuleExtension>("essentialsModule", project)
|
|
|
|
tasks {
|
|
runServer {
|
|
minecraftVersion(RUN_PAPER_MINECRAFT_VERSION)
|
|
runDirectory(rootProject.file("run"))
|
|
if (project.name != "EssentialsX") {
|
|
pluginJars.from(rootProject.project(":EssentialsX").the<EssentialsModuleExtension>().archiveFile)
|
|
}
|
|
}
|
|
jar {
|
|
moduleExtension.archiveFile.set(archiveFile)
|
|
}
|
|
val copyJar = register<FileCopyTask>("copyJar") {
|
|
fileToCopy.set(moduleExtension.archiveFile)
|
|
destination.set(rootProject.layout.projectDirectory.dir(provider { "jars" }).flatMap {
|
|
it.file(fileToCopy.map { file -> file.asFile.name })
|
|
})
|
|
}
|
|
build {
|
|
dependsOn(copyJar)
|
|
}
|
|
}
|