forked from typelevel/cats-time
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
102 lines (95 loc) · 3.14 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}
Global / onChangedBuildSource := ReloadOnSourceChanges
lazy val `cats-time` = project
.in(file("."))
.disablePlugins(MimaPlugin)
.enablePlugins(NoPublishPlugin)
.settings(commonSettings)
.aggregate(core.jvm, core.jvm)
lazy val core = crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Pure)
.in(file("modules/core"))
.settings(commonSettings)
.settings(
name := "cats-time"
)
.jsSettings(
libraryDependencies += "io.github.cquiroz" %%% "scala-java-time" % "2.3.0"
)
lazy val docs = project
.in(file("modules/docs"))
.settings(commonSettings, micrositeSettings)
.dependsOn(core.jvm)
.disablePlugins(MimaPlugin)
.enablePlugins(MicrositesPlugin)
.enablePlugins(MdocPlugin)
.enablePlugins(NoPublishPlugin)
.settings(mdocIn := sourceDirectory.value / "main" / "mdoc")
// General Settings
lazy val commonSettings = Seq(
scalaVersion := "3.0.1",
crossScalaVersions := Seq("3.0.1", "2.12.13", "2.13.6"),
libraryDependencies ++= Seq(
"org.typelevel" %%% "cats-core" % "2.6.1",
"org.typelevel" %%% "cats-testkit-scalatest" % "2.1.5" % Test,
"org.scala-lang.modules" %%% "scala-collection-compat" % "2.5.0" % Test,
)
)
lazy val micrositeSettings = Seq(
micrositeName := "cats-time",
micrositeDescription := "Cats Typeclasses for Java Time",
micrositeAuthor := "Christopher Davenport",
micrositeGithubOwner := "typelevel",
micrositeGithubRepo := "cats-time",
micrositeBaseUrl := "/cats-time",
micrositeDocumentationUrl := "https://typelevel.org/cats-time",
micrositeFooterText := None,
micrositeHighlightTheme := "atom-one-light",
micrositePalette := Map(
"brand-primary" -> "#3e5b95",
"brand-secondary" -> "#294066",
"brand-tertiary" -> "#2d5799",
"gray-dark" -> "#49494B",
"gray" -> "#7B7B7E",
"gray-light" -> "#E5E5E6",
"gray-lighter" -> "#F4F3F4",
"white-color" -> "#FFFFFF"
),
Compile / scalacOptions --= Seq(
"-Xfatal-warnings",
"-Ywarn-unused-import",
"-Ywarn-numeric-widen",
"-Ywarn-dead-code",
"-Ywarn-unused:imports",
"-Xlint:-missing-interpolator,_"
),
libraryDependencies += "com.47deg" %% "github4s" % "0.24.1",
micrositePushSiteWith := GitHub4s,
micrositeGitterChannel := true,
micrositeGitterChannelUrl := "typelevel/cats",
micrositeGithubToken := sys.env.get("GITHUB_TOKEN")
)
// General Settings
inThisBuild(
List(
organization := "io.chrisdavenport",
developers := List(
Developer(
"ChristopherDavenport",
"Christopher Davenport",
url("https://github.com/ChristopherDavenport")
)
),
homepage := Some(url("https://github.com/typelevel/cats-time")),
licenses += ("MIT", url("http://opensource.org/licenses/MIT")),
pomIncludeRepository := { _ => false },
Compile / doc / scalacOptions ++= Seq(
"-groups",
"-sourcepath",
(LocalRootProject / baseDirectory).value.getAbsolutePath,
"-doc-source-url",
"https://github.com/typelevel/cats-time/blob/v" + version.value + "€{FILE_PATH}.scala"
)
)
)