-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.sbt
108 lines (93 loc) · 3.2 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
103
104
105
106
107
108
name := "volga"
val publishVersion = "0.2"
val scala3version = "3.5.2"
val scala2version = "2.13.14"
crossScalaVersions := List(scala3version, scala2version)
publish / skip := true
val oldMacroDeps = List(
libraryDependencies ++= List(
scalaOrganization.value % "scala-reflect" % scalaVersion.value % Provided
),
scalacOptions += "-language:experimental.macros"
)
val modules = file("modules")
val publishSettings = List(
moduleName := { "volga-" + name.value },
publishMavenStyle := true,
homepage := Some(url("https://manatki.org/docs/derevo")),
scmInfo := Some(
ScmInfo(
url("https://github.com/manatki/derevo"),
"[email protected]:manatki/derevo.git"
)
),
developers := List(
Developer(
"odomontois",
"Oleg Nizhnik",
url("https://github.com/odomontois")
)
),
organization := "org.manatki",
version := {
val branch = git.gitCurrentBranch.value
if (branch == "master") publishVersion
else s"$publishVersion-$branch-SNAPSHOT"
},
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0"))
)
val commonSettings = Vector(
scalaVersion := scala3version,
crossScalaVersions := List(scala3version),
scalacOptions ++= Vector(
// "-source",
// "future",
"-Ykind-projector:underscores",
"-Yshow-suppressed-errors",
"-Yexplicit-nulls"
)
)
lazy val core = project
.in(modules / "core")
.settings(
commonSettings,
libraryDependencies += "net.sourceforge.plantuml" % "plantuml" % "1.2022.14" % Test,
libraryDependencies += "org.scalameta" %% "munit" % "1.0.0-M7" % Test
)
lazy val prob = project.in(modules / "prob").settings(commonSettings).dependsOn(core)
lazy val glue = project.in(modules / "glue").settings(commonSettings).dependsOn(core)
val oldSettings = Vector(
libraryDependencies ++= List(
"org.typelevel" %% "cats-core" % "2.8.0",
"dev.optics" %% "monocle-macro" % "3.1.0",
"tf.tofu" %% "glass-core" % "0.2.1",
"tf.tofu" %% "glass-macro" % "0.2.1",
"org.typelevel" %% "simulacrum" % "1.0.1"
),
libraryDependencies ++= List(
"com.lihaoyi" %% "fastparse" % "2.2.2",
"org.scalatest" %% "scalatest" % "3.2.14",
"org.scalacheck" %% "scalacheck" % "1.15.4",
"org.scalatestplus" %% "scalacheck-1-17" % "3.2.14.0",
"org.typelevel" %% "mouse" % "1.2.0"
) map (_ % Test),
libraryDependencies ++=
List(
compilerPlugin("org.typelevel" % "kind-projector" % "0.13.3" cross CrossVersion.patch),
compilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1")
),
scalaVersion := scala2version,
crossScalaVersions := List(scala2version),
scalacOptions ++=
List(
"-language:higherKinds",
"-language:postfixOps",
"-deprecation",
"-Ymacro-annotations"
),
publish / skip := true
)
lazy val old = modules / "old"
lazy val oldCore = project.in(old / "core").settings(oldSettings)
lazy val oldMacros = project.in(old / "macros").settings(oldSettings ++ oldMacroDeps).dependsOn(oldCore)