-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sbt
More file actions
68 lines (59 loc) · 2.21 KB
/
Copy pathbuild.sbt
File metadata and controls
68 lines (59 loc) · 2.21 KB
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
run / fork := true
Global / cancelable := true
ThisBuild / version := "0.2-SNAPSHOT"
ThisBuild / scalaVersion := "3.8.1"
ThisBuild / organization := "ch.contrafactus"
// Add resolver for snapshot dependencies
ThisBuild / resolvers += "Central Portal Snapshots" at "https://central.sonatype.com/repository/maven-snapshots/"
// Setup for Scalafix and SemanticDB
inThisBuild(Seq(
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision,
semanticdbOptions += "-Wunused:imports"
))
addCommandAlias("testAndCoverage", "; clean; coverage; test; coverageReport")
lazy val root = (project in file("."))
.aggregate(core, examples)
.settings(
name := "plotwit-root"
)
lazy val core = (project in file("core"))
.settings(
name := "plotwit-core",
libraryDependencies ++= Seq(
"org.scalameta" %% "munit" % "1.0.0" % Test,
"org.scalatest" %% "scalatest" % "3.2.19" % Test,
"org.scalacheck" %% "scalacheck" % "1.18.0" % Test,
"org.scalatestplus" %% "scalacheck-1-18" % "3.2.19.0" % Test,
"dev.scalapy" %% "scalapy-core" % "0.5.3",
// DimWit
"ch.contrafactus" %% "dimwit-core" % "0.2-SNAPSHOT" changing (),
// Viz 4 Scala
"io.github.quafadas" %% "dedav4s" % "0.10.5"
),
Compile / packageSrc / publishArtifact := true,
Compile / packageDoc / publishArtifact := true
)
// Examples subproject
lazy val examples = (project in file("examples"))
.dependsOn(core)
.settings(
name := "plotwit-examples",
libraryDependencies ++= Seq(
"dev.scalapy" %% "scalapy-core" % "0.5.3"
),
fork := true,
// Don't publish examples
publish := {},
publishLocal := {},
publishArtifact := false,
// Examples source directory
Compile / scalaSource := baseDirectory.value,
Compile / resourceDirectory := baseDirectory.value / "src" / "main" / "resources"
)
// Renders the plots of the README gallery into docs/plots
lazy val renderPlots = taskKey[Unit]("Render every plot of the README gallery into docs/plots")
renderPlots := Def.taskDyn {
val outDir = (ThisBuild / baseDirectory).value / "docs" / "plots"
(examples / Compile / runMain).toTask(s" plotwit.examples.plots.renderPlots ${outDir.getAbsolutePath}")
}.value