-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sbt
More file actions
34 lines (28 loc) · 960 Bytes
/
build.sbt
File metadata and controls
34 lines (28 loc) · 960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
resolvers += Resolver.bintrayRepo("netlogo", "NetLogo-JVM")
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.0.8" % Test,
"org.nlogo" % "netlogo" % "6.1.0" % Test
)
scalaVersion := "2.12.8"
lazy val downloadFromZip = taskKey[Unit]("Download zipped extensions and extract them to ./extensions")
downloadFromZip := {
val baseURL = "https://raw.githubusercontent.com/NetLogo/NetLogo-Libraries/6.1/extensions/"
val extensions = List(
"table" -> "table-1.3.1.zip",
"nw" -> "nw-3.7.7.zip",
"rnd" -> "rnd-3.0.1.zip",
"csv" -> "csv-1.1.1.zip",
"matrix" -> "matrix-1.1.1.zip"
)
for {
(extension, file) <- extensions
path = new File("extensions/" + extension)
if java.nio.file.Files.notExists(path.toPath)
url = new URL(baseURL + file)
} {
println("Downloading " + url)
IO.unzipURL(url, path)
}
}
compile in Test := (compile in Test).dependsOn(downloadFromZip).value
fork in Test := true