Skip to content

Instantly share code, notes, and snippets.

@Konicai
Created March 11, 2023 19:49
Show Gist options
  • Select an option

  • Save Konicai/7ec4188a7e3be379b4b0b25c51cf5a68 to your computer and use it in GitHub Desktop.

Select an option

Save Konicai/7ec4188a7e3be379b4b0b25c51cf5a68 to your computer and use it in GitHub Desktop.
task<Exec>("runGeyser") {
println("current directory: ${File("").absoluteFile.name}")
val geyser = "geyser/Geyser-Standalone.jar"
val file = File(geyser)
if (file.exists()) {
val joiner = StringJoiner(" ")
for (mapping in File("mappings").listFiles()!!) {
val name = mapping.name
joiner.add(name)
println("Copying $name into $geyser")
}
val filesArg = joiner.toString()
println("All files to be copied: $filesArg")
commandLine("java uf", geyser, filesArg)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment