-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
66 lines (55 loc) · 2.76 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
val stableVersion = settingKey[String]("The version of ocaps that we want the user to download.")
stableVersion := "1.0.0"
val catsVersion = "2.12.0"
val catsEffectVersion = "3.5.7"
lazy val root = (project in file("."))
.enablePlugins(ParadoxPlugin) // https://developer.lightbend.com/docs/paradox/current/index.html
.enablePlugins(ParadoxSitePlugin) // https://www.scala-sbt.org/sbt-site/generators/paradox.html
.enablePlugins(SitePreviewPlugin) // https://www.scala-sbt.org/sbt-site/generators/paradox.html
.enablePlugins(SiteScaladocPlugin) // https://www.scala-sbt.org/sbt-site/api-documentation.html#scaladoc
.enablePlugins(ScalaUnidocPlugin) // https://github.com/sbt/sbt-unidoc#how-to-unify-scaladoc
.enablePlugins(GhpagesPlugin) // https://github.com/sbt/sbt-ghpages
.settings(
name := "ocaps",
// scaladoc settings
scalacOptions in (Compile, doc) ++= Seq(
"-doc-title", name.value,
"-doc-version", version.value,
"-doc-footer", "",
"-sourcepath", (sourceDirectory in Compile).value.getPath, // needed for scaladoc to strip the location of the linked source path
"-doc-source-url", s"https://github.com/tersesystems/ocaps/blob/${version.value}/ocaps/src/main€{FILE_PATH}.scala",
"-implicits",
"-diagrams", // requires graphviz
"-groups"
),
autoAPIMappings := true,
// siteSubdirName in SiteScaladoc := {
// val (major, minor) = apiVersion
// "api/$major.minor"
// },
// apiURL in doc := {
// val (major, minor) = apiVersion.value
// Some(url(s"https://wsargent.github.io/ocaps/api/${major}.${minor}"))
// },
// siteSourceDirectory := target.value / "generated-stuff",
// paradox settings
paradoxProperties ++= Map(
"version" -> stableVersion.value,
"snip.examples.base_dir" -> s"${(sourceDirectory in Test).value}/scala/ocaps/examples",
),
paradoxTheme := Some(builtinParadoxTheme("generic")),
paradoxRoots := List("index.html"),
libraryDependencies += "org.slf4j" % "slf4j-api" % "2.0.16" % Test,
// https://mvnrepository.com/artifact/ch.qos.logback/logback-classic
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.5.12" % Test,
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test,
libraryDependencies += "org.typelevel" %% "cats-core" % catsVersion % Test,
git.remoteRepo := "[email protected]:tersesystems/ocaps.git",
// https://github.com/sbt/sbt-header
organizationName := "Terse Systems",
startYear := Some(2018),
licenses += ("Apache-2.0", new URL("https://www.apache.org/licenses/LICENSE-2.0.txt")),
homepage := Some(url("https://github.com/tersesystems/ocaps")),
publishArtifact in Test := false,
releaseCrossBuild := true
)