-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild.sbt
100 lines (81 loc) · 3.42 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
import com.typesafe.tools.mima.core._
ThisBuild / tlBaseVersion := "0.6" // your current series x.y
ThisBuild / organization := "io.chrisdavenport"
ThisBuild / organizationName := "Christopher Davenport"
ThisBuild / licenses := Seq(License.MIT)
ThisBuild / developers := List(
// your GitHub handle and name
tlGitHubDev("christopherdavenport", "Christopher Davenport")
)
ThisBuild / tlCiReleaseBranches := Seq("main")
ThisBuild / githubWorkflowBuildPreamble ++= nativeBrewInstallWorkflowSteps.value
val catsV = "2.11.0"
val catsEffectV = "3.5.4"
val fs2V = "3.10.2"
val munitCatsEffectV = "2.0.0-M4"
ThisBuild / crossScalaVersions := Seq("2.12.19","2.13.14", "3.4.2")
ThisBuild / scalaVersion := "2.13.14"
ThisBuild / versionScheme := Some("early-semver")
// Projects
lazy val `rediculous` = tlCrossRootProject
.aggregate(core, examples)
lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform)
// .crossType(CrossType.Pure)
.in(file("core"))
.settings(
name := "rediculous",
testFrameworks += new TestFramework("munit.Framework"),
libraryDependencies ++= Seq(
"org.typelevel" %%% "cats-core" % catsV,
"org.typelevel" %%% "cats-effect" % catsEffectV,
"co.fs2" %%% "fs2-core" % fs2V,
"co.fs2" %%% "fs2-io" % fs2V,
"co.fs2" %%% "fs2-scodec" % fs2V,
"org.typelevel" %%% "keypool" % "0.4.9",
"io.chrisdavenport" %%% "cats-scalacheck" % "0.3.2" % Test,
"org.typelevel" %%% "munit-cats-effect" % munitCatsEffectV % Test,
"org.scalameta" %%% "munit-scalacheck" % "1.0.0-M10" % Test,
),
libraryDependencies += "org.scodec" %%% "scodec-core" % (if (scalaVersion.value.startsWith("2.")) "1.11.10" else "2.2.2"),
).jsSettings(
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.CommonJSModule)}
).jvmSettings(
libraryDependencies += "com.github.jnr" % "jnr-unixsocket" % "0.38.22" % Test,
)
.platformsSettings(JVMPlatform, JSPlatform)(
libraryDependencies ++= Seq(
"io.chrisdavenport" %%% "whale-tail-manager" % "0.0.11" % Test,
)
)
.nativeEnablePlugins(ScalaNativeBrewedConfigPlugin)
.platformsSettings(NativePlatform)(
libraryDependencies ++= Seq(
"com.armanbilge" %%% "epollcat" % "0.1.6" % Test
),
Test / nativeBrewFormulas ++= Set("s2n"),
Test / envVars ++= Map("S2N_DONT_MLOCK" -> "1")
)
lazy val examples = crossProject(JVMPlatform, JSPlatform)
.crossType(CrossType.Pure)
.in(file("examples"))
.disablePlugins(MimaPlugin)
.enablePlugins(NoPublishPlugin)
.dependsOn(core)
.settings(
name := "rediculous-examples",
run / fork := true,
).jsSettings(
libraryDependencies ++= Seq(
"io.github.cquiroz" %%% "scala-java-time" % "2.6.0"
),
Compile / mainClass := Some("BasicExample"),
scalaJSUseMainModuleInitializer := true,
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.CommonJSModule)},
scalaJSStage := FullOptStage,
)
lazy val examplesJVM = examples.jvm
lazy val examplesJS = examples.js
lazy val site = project.in(file("site"))
.enablePlugins(TypelevelSitePlugin)
.settings(tlSiteIsTypelevelProject := Some(TypelevelProject.Affiliate))
.dependsOn(core.jvm)