Update build dependencies

This commit is contained in:
Tad Fisher
2021-02-01 14:56:06 -08:00
parent 13958d35bf
commit 55b3b60535
20 changed files with 284 additions and 82 deletions

View File

@@ -12,6 +12,8 @@ import strikt.assertions.toPath
import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.Paths
import kotlin.io.path.ExperimentalPathApi
import kotlin.io.path.createTempDirectory
private val moshi = Moshi.Builder().build()
@@ -36,6 +38,7 @@ class Fixture(val project: Path) {
}
}
@OptIn(ExperimentalPathApi::class)
fun Root.fixture(name: String) {
val fixture by memoized(
factory = {
@@ -43,7 +46,7 @@ fun Root.fixture(name: String) {
"$name: No test fixture found"
}
val fixtureRoot = Paths.get(url)
val dest = createTempDir("gradle2nix").toPath()
val dest = createTempDirectory("gradle2nix")
val src = checkNotNull(fixtureRoot.takeIf { Files.exists(it) }) {
"$name: Test fixture not found: $fixtureRoot"
}