Path.directory scripted test

This commit is contained in:
João Ferreira 2024-12-10 18:51:55 +00:00 committed by Eugene Yokota
parent 6d0b43a2b6
commit 4a588c3fe9
3 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,16 @@
name := "Mappings Test"
scalaVersion := "3.3.1"
version := "0.2"
Compile / packageBin / mappings ++= {
val converter = fileConverter.value
Path.directory(file("test")).map { case (f,s) => converter.toVirtualFile(f.toPath) -> s }
}
lazy val unzipPackage = taskKey[Unit]("extract jar file")
unzipPackage := {
val converter = fileConverter.value
val p = converter.toPath((Compile / packageBin).value)
IO.unzip(p.toFile(), target.value / "extracted")
}

View File

@ -0,0 +1,2 @@
> unzipPackage
$ exists target/out/jvm/scala-3.3.1/mappings-test/extracted/test