6502-opcodes/project/ProjectPlugin.scala

40 lines
1.1 KiB
Scala
Raw Normal View History

2020-03-21 03:45:13 +00:00
import sbt.Keys._
import sbt._
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 =
2022-11-14 20:49:53 +00:00
p.settings(libraryDependencies += "org.typelevel" %% "cats-core" % "2.9.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 =
"0.8.0"
p.settings(
testFrameworks += new TestFramework("weaver.framework.CatsEffect"),
libraryDependencies ++= Seq(
2023-01-06 14:49:20 +00:00
"org.scalatest" %% "scalatest" % "3.2.15" % 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
}