mirror of
https://github.com/mcanlas/6502-opcodes.git
synced 2024-12-22 09:30:45 +00:00
40 lines
1.1 KiB
Scala
40 lines
1.1 KiB
Scala
import sbt.Keys.*
|
|
import sbt.*
|
|
|
|
object ProjectPlugin extends AutoPlugin {
|
|
override def trigger = allRequirements
|
|
|
|
val autoImport = ThingsToImport
|
|
|
|
object ThingsToImport {
|
|
private def jarName(s: String) =
|
|
"firepower-" + s
|
|
|
|
def module(s: String): Project =
|
|
Project(s, file(jarName(s)))
|
|
.settings(name := jarName(s))
|
|
|
|
implicit class ProjectOps(p: Project) {
|
|
def withCats: Project =
|
|
p.settings(libraryDependencies += "org.typelevel" %% "cats-core" % "2.10.0")
|
|
|
|
def withEfectMonad: Project =
|
|
p.settings(libraryDependencies += "dev.zio" %% "zio" % "2.0.4")
|
|
|
|
def withTesting: Project = {
|
|
val weaverVersion =
|
|
"0.8.3"
|
|
|
|
p.settings(
|
|
testFrameworks += new TestFramework("weaver.framework.CatsEffect"),
|
|
libraryDependencies ++= Seq(
|
|
"org.scalatest" %% "scalatest" % "3.2.16" % Test,
|
|
"com.disneystreaming" %% "weaver-cats" % weaverVersion % Test,
|
|
"com.disneystreaming" %% "weaver-scalacheck" % weaverVersion % Test
|
|
)
|
|
)
|
|
}
|
|
}
|
|
}
|
|
}
|