6502-opcodes/project/ProjectPlugin.scala

40 lines
1.1 KiB
Scala
Raw Normal View History

2023-10-03 20:15:10 +00:00
import sbt.Keys.*
import sbt.*
2020-03-21 03:45:13 +00:00
object ProjectPlugin extends AutoPlugin {
override def trigger = allRequirements
2022-02-14 17:27:25 +00:00
val autoImport = ThingsToImport
2020-08-13 01:10:19 +00:00
2022-02-14 17:27:25 +00:00
object ThingsToImport {
2022-12-01 11:50:22 +00:00
private def jarName(s: String) =
"firepower-" + s
def module(s: String): Project =
Project(s, file(jarName(s)))
.settings(name := jarName(s))
2020-08-13 01:10:19 +00:00
implicit class ProjectOps(p: Project) {
def withCats: Project =
2023-10-01 15:48:37 +00:00
p.settings(libraryDependencies += "org.typelevel" %% "cats-core" % "2.10.0")
2020-08-15 04:49:07 +00:00
2022-12-01 11:50:22 +00:00
def withEfectMonad: Project =
p.settings(libraryDependencies += "dev.zio" %% "zio" % "2.0.4")
2022-11-20 02:42:48 +00:00
def withTesting: Project = {
val weaverVersion =
2023-04-15 18:30:55 +00:00
"0.8.3"
2022-11-20 02:42:48 +00:00
p.settings(
testFrameworks += new TestFramework("weaver.framework.CatsEffect"),
libraryDependencies ++= Seq(
2023-07-26 12:19:59 +00:00
"org.scalatest" %% "scalatest" % "3.2.16" % Test,
2022-11-20 02:42:48 +00:00
"com.disneystreaming" %% "weaver-cats" % weaverVersion % Test,
"com.disneystreaming" %% "weaver-scalacheck" % weaverVersion % Test
)
)
}
2020-08-13 01:10:19 +00:00
}
}
2020-03-21 03:45:13 +00:00
}