-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
192 lines (174 loc) · 7.73 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
name := "probability"
ThisBuild / tlBaseVersion := "0.4"
xerial.sbt.Sonatype.SonatypeKeys.sonatypeProfileName := "au.id.tmm"
Global / xerial.sbt.Sonatype.SonatypeKeys.sonatypeProfileName := "au.id.tmm"
ThisBuild / xerial.sbt.Sonatype.SonatypeKeys.sonatypeProfileName := "au.id.tmm"
ThisBuild / organization := "au.id.tmm.probability"
ThisBuild / organizationName := "Timothy McCarthy"
ThisBuild / startYear := Some(2019)
ThisBuild / developers := List(
tlGitHubDev("tmccarthy", "Timothy McCarthy"),
)
val Scala213 = "2.13.13"
val Scala3 = "3.2.1"
ThisBuild / scalaVersion := Scala3
ThisBuild / crossScalaVersions := Seq(
// Scala3,
Scala213,
)
ThisBuild / githubWorkflowJavaVersions := List(
JavaSpec.temurin("17"),
)
ThisBuild / tlCiHeaderCheck := false
ThisBuild / tlCiScalafmtCheck := true
ThisBuild / tlCiMimaBinaryIssueCheck := false
ThisBuild / tlCiDependencyGraphJob := false
ThisBuild / tlFatalWarnings := true
ThisBuild / tlSonatypeUseLegacyHost := true
addCommandAlias("check", ";githubWorkflowCheck;scalafmtSbtCheck;+scalafmtCheckAll;+test")
addCommandAlias("fix", ";githubWorkflowGenerate;scalafmtSbt;+scalafmtAll")
val scalatestVersion = "3.2.18"
val tmmUtilsVersion = "0.10.0"
val catsVersion = "2.10.0"
val spireVersion = "0.18.0"
val catsTestkitVersion = "2.1.5"
val scalacheckVersion = "1.18.0"
val circeVersion = "0.14.3"
lazy val root = tlCrossRootProject
.settings(console := (core / Compile / console).value)
.settings(xerial.sbt.Sonatype.SonatypeKeys.sonatypeProfileName := "au.id.tmm")
.aggregate(
core,
coreCirce,
coreScalacheck,
coreCats,
coreApacheMath,
coreTesting,
exhaustiveDistribution,
exhaustiveDistributionCirce,
exhaustiveDistributionScalacheck,
exhaustiveDistributionCats,
)
lazy val core = project
.in(file("core/core"))
.settings(name := "probability-core")
.settings(xerial.sbt.Sonatype.SonatypeKeys.sonatypeProfileName := "au.id.tmm")
.settings(
)
.settings(
libraryDependencies += "au.id.tmm.tmm-utils" %% "tmm-utils-testing-core" % tmmUtilsVersion % Test,
libraryDependencies += "org.scalatest" %% "scalatest" % scalatestVersion % Test,
)
lazy val coreCirce = project
.in(file("core/circe"))
.settings(name := "probability-core-circe")
.settings(xerial.sbt.Sonatype.SonatypeKeys.sonatypeProfileName := "au.id.tmm")
.settings(
libraryDependencies += "io.circe" %% "circe-core" % circeVersion,
)
.settings(
libraryDependencies += "au.id.tmm.tmm-utils" %% "tmm-utils-testing-core" % tmmUtilsVersion % Test,
libraryDependencies += "org.scalatest" %% "scalatest" % scalatestVersion % Test,
)
.dependsOn(core)
lazy val coreScalacheck = project
.in(file("core/scalacheck"))
.settings(name := "probability-core-scalacheck")
.settings(xerial.sbt.Sonatype.SonatypeKeys.sonatypeProfileName := "au.id.tmm")
.settings(
libraryDependencies += "org.scalacheck" %% "scalacheck" % scalacheckVersion,
)
.settings(
libraryDependencies += "au.id.tmm.tmm-utils" %% "tmm-utils-testing-core" % tmmUtilsVersion % Test,
libraryDependencies += "org.scalatest" %% "scalatest" % scalatestVersion % Test,
)
.dependsOn(core)
lazy val coreCats = project
.in(file("core/cats"))
.settings(name := "probability-core-cats")
.settings(xerial.sbt.Sonatype.SonatypeKeys.sonatypeProfileName := "au.id.tmm")
.settings(
libraryDependencies += "org.typelevel" %% "cats-core" % "2.10.0",
)
.settings(
libraryDependencies += "au.id.tmm.tmm-utils" %% "tmm-utils-testing-core" % tmmUtilsVersion % Test,
libraryDependencies += "org.scalatest" %% "scalatest" % scalatestVersion % Test,
libraryDependencies += "org.typelevel" %% "cats-testkit-scalatest" % catsTestkitVersion % Test,
)
.dependsOn(core, coreScalacheck % "test->compile")
lazy val coreApacheMath = project
.in(file("core/apache-math"))
.settings(name := "probability-core-apache-math")
.settings(xerial.sbt.Sonatype.SonatypeKeys.sonatypeProfileName := "au.id.tmm")
.settings(
libraryDependencies += "org.apache.commons" % "commons-math3" % "3.6.1",
)
.settings(
libraryDependencies += "au.id.tmm.tmm-utils" %% "tmm-utils-testing-core" % tmmUtilsVersion % Test,
libraryDependencies += "org.scalatest" %% "scalatest" % scalatestVersion % Test,
)
.dependsOn(core)
lazy val coreTesting = project
.in(file("core/testing"))
.settings(name := "probability-core-testing")
.settings(xerial.sbt.Sonatype.SonatypeKeys.sonatypeProfileName := "au.id.tmm")
.settings(
libraryDependencies += "org.scalatest" %% "scalatest" % scalatestVersion,
)
.settings(
libraryDependencies += "au.id.tmm.tmm-utils" %% "tmm-utils-testing-core" % tmmUtilsVersion % Test,
libraryDependencies += "org.scalatest" %% "scalatest" % scalatestVersion % Test,
)
.dependsOn(core, coreApacheMath, core % "test->test")
lazy val exhaustiveDistribution = project
.in(file("distribution-exhaustive/core"))
.settings(name := "probability-distribution-exhaustive")
.settings(xerial.sbt.Sonatype.SonatypeKeys.sonatypeProfileName := "au.id.tmm")
.settings(
libraryDependencies += "org.typelevel" %% "spire" % spireVersion,
)
.settings(
libraryDependencies += "au.id.tmm.tmm-utils" %% "tmm-utils-testing-core" % tmmUtilsVersion % Test,
libraryDependencies += "org.scalatest" %% "scalatest" % scalatestVersion % Test,
)
.dependsOn(core, core % "test->test")
lazy val exhaustiveDistributionCirce = project
.in(file("distribution-exhaustive/circe"))
.settings(name := "probability-distribution-exhaustive-circe")
.settings(xerial.sbt.Sonatype.SonatypeKeys.sonatypeProfileName := "au.id.tmm")
.settings(
libraryDependencies += "io.circe" %% "circe-core" % circeVersion,
)
.settings(
libraryDependencies += "au.id.tmm.tmm-utils" %% "tmm-utils-testing-core" % tmmUtilsVersion % Test,
libraryDependencies += "org.scalatest" %% "scalatest" % scalatestVersion % Test,
)
.dependsOn(exhaustiveDistribution)
lazy val exhaustiveDistributionScalacheck = project
.in(file("distribution-exhaustive/scalacheck"))
.settings(name := "probability-distribution-exhaustive-scalacheck")
.settings(xerial.sbt.Sonatype.SonatypeKeys.sonatypeProfileName := "au.id.tmm")
.settings(
libraryDependencies += "org.scalacheck" %% "scalacheck" % scalacheckVersion,
)
.settings(
libraryDependencies += "au.id.tmm.tmm-utils" %% "tmm-utils-testing-core" % tmmUtilsVersion % Test,
libraryDependencies += "org.scalatest" %% "scalatest" % scalatestVersion % Test,
libraryDependencies += "org.scalatestplus" %% "scalacheck-1-17" % "3.2.18.0" % Test,
)
.dependsOn(exhaustiveDistribution)
lazy val exhaustiveDistributionCats = project
.in(file("distribution-exhaustive/cats"))
.settings(name := "probability-distribution-exhaustive-cats")
.settings(xerial.sbt.Sonatype.SonatypeKeys.sonatypeProfileName := "au.id.tmm")
.settings(
libraryDependencies += "org.typelevel" %% "cats-core" % "2.10.0",
)
.settings(
libraryDependencies += "au.id.tmm.tmm-utils" %% "tmm-utils-testing-core" % tmmUtilsVersion % Test,
libraryDependencies += "au.id.tmm.tmm-utils" %% "tmm-utils-testing-cats" % tmmUtilsVersion % Test,
libraryDependencies += "au.id.tmm.tmm-utils" %% "tmm-utils-testing-scalacheck" % tmmUtilsVersion % Test,
libraryDependencies += "org.scalatest" %% "scalatest" % scalatestVersion % Test,
libraryDependencies += "org.typelevel" %% "cats-testkit-scalatest" % catsTestkitVersion % Test,
)
.dependsOn(exhaustiveDistribution, coreCats, exhaustiveDistributionScalacheck % "test->compile")