forked from scala-ts/scala-ts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
71 lines (59 loc) · 2.24 KB
/
build.sbt
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Global / onChangedBuildSource := ReloadOnSourceChanges
val scalaV = "3.3.4"
ThisBuild / scalaVersion := scalaV
ThisBuild / crossScalaVersions := Seq(scalaV)
// GitHub Actions config
val javaVersions = Seq(8, 11, 17, 21).map(v => JavaSpec.temurin(v.toString))
ThisBuild / githubWorkflowJavaVersions := javaVersions
ThisBuild / githubWorkflowArtifactUpload := false
ThisBuild / githubWorkflowBuildMatrixFailFast := Some(false)
ThisBuild / githubWorkflowTargetBranches := Seq("master")
ThisBuild / githubWorkflowBuild := Seq(
WorkflowStep.Run(List("cd tests && yarn && cd .."), name = Some("yarn install")),
WorkflowStep.Sbt(List("test"), name = Some("test")),
)
ThisBuild / githubWorkflowPublishTargetBranches := Seq()
lazy val cats = "org.typelevel" %% "cats-core" % "2.12.0"
def circe(proj: String) = "io.circe" %% s"circe-$proj" % "0.14.10"
lazy val joda = "joda-time" % "joda-time" % "2.13.0"
def munit(proj: String = "") =
"org.scalameta" %%
s"munit${if (proj == "") "" else s"-$proj"}" %
(proj match {
case "" => "1.0.2"
case "scalacheck" => "1.0.0"
case _ => sys.error(s"Unknown munit project: $proj")
}) %
Test
lazy val scalacheck = "org.scalacheck" %% "scalacheck" % "1.18.1" % Test
lazy val scalaz = "org.scalaz" %% "scalaz-core" % "7.3.8"
lazy val slf4j = "org.slf4j" % "slf4j-api" % "2.0.16"
lazy val root = project.in(file("."))
.settings(
name := "scala-ts",
organization := "bondlink",
version := "0.16.0",
scalaVersion := scalaV,
Compile / doc / scalacOptions += "-skip-by-regex:^scalats\\.BuildInfo\\$$",
libraryDependencies ++= Seq(
cats,
// Optional dependencies to provide more scala => TS type support
circe("core") % Optional,
joda % Optional,
scalaz % Optional,
// Test dependencies
circe("parser") % Test,
munit(),
munit("scalacheck"),
scalacheck,
slf4j,
),
buildInfoPackage := "scalats",
buildInfoKeys := Seq(BuildInfoKey.action("testsDir")(baseDirectory.value / "tests")),
// Publish settings
publishMavenStyle := true,
Test / publishArtifact := false,
gitPublishDir := file("/src/maven-repo"),
licenses += ("MIT", url("https://opensource.org/licenses/MIT")),
)
.enablePlugins(BuildInfoPlugin)