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:
@@ -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")
|
||||
|
Reference in New Issue
Block a user