1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-10-18 15:37:38 +00:00

Fix a whole bunch of GH action issues

- Switch over to the Gradle GH action. Not expecting massive changes,
   but might provide some better caching.

 - Bump some GH action versions.

 - Fix a Java 8 compatability issue in our build scripts.
This commit is contained in:
Jonathan Coates
2022-10-22 21:21:33 +01:00
parent b48f590b92
commit 3e3bc8d4b1
3 changed files with 17 additions and 21 deletions

View File

@@ -4,6 +4,7 @@ import org.codehaus.groovy.runtime.ProcessGroovyMethods
import java.io.BufferedReader
import java.io.IOException
import java.io.InputStreamReader
import java.util.stream.Collectors
internal object ProcessHelpers {
fun startProcess(vararg command: String): Process {
@@ -25,7 +26,7 @@ internal object ProcessHelpers {
fun captureLines(process: Process): List<String> {
val out = BufferedReader(InputStreamReader(process.inputStream)).use { reader ->
reader.lines().filter { it.isNotEmpty() }.toList()
reader.lines().filter { it.isNotEmpty() }.collect(Collectors.toList())
}
ProcessGroovyMethods.closeStreams(process)
if (process.waitFor() != 0) throw IOException("Command exited with a non-0 status")