-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.sbt
157 lines (152 loc) · 4.1 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
import LibraryDependencies._
import laika.config._
import laika.helium.Helium
import laika.helium.config.TextLink
import laika.helium.config.ThemeNavigationSection
val Scala212 = "2.12.20"
val Scala213 = "2.13.16"
val Scala3 = "3.3.4"
val allScalaVersions = List(Scala213, Scala3, Scala212)
inThisBuild(
Seq(
tlVersionIntroduced := Map(
"2.13" -> "8.0.0",
"2.12" -> "8.0.0",
"3" -> "8.0.0"
),
tlBaseVersion := "8.0",
organization := "io.github.etspaceman",
organizationName := "etspaceman",
description := "Fake data generation using ScalaCheck Arbitrary instances",
startYear := Some(2020),
scalaVersion := Scala213,
crossScalaVersions := allScalaVersions,
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision,
licenses := Seq(License.MIT),
developers := List(tlGitHubDev("etspaceman", "Eric Meisel")),
tlCiHeaderCheck := true,
tlCiScalafmtCheck := true,
tlCiScalafixCheck := true,
githubWorkflowJavaVersions := Seq(
JavaSpec.temurin("17")
),
tlCiReleaseBranches := Seq("main"),
tlSonatypeUseLegacyHost := true,
mergifyStewardConfig := Some(
MergifyStewardConfig(
action = MergifyAction.Merge(method = Some("squash")),
author = "etspaceman-scala-steward-app[bot]"
)
),
scmInfo := Some(
ScmInfo(
url(
s"https://github.com/etspaceman/scalacheck-faker"
),
s"[email protected]:etspaceman/scalacheck-faker.git"
)
),
homepage := Some(
url("https://github.com/etspaceman/scalacheck-faker")
)
)
)
lazy val `scalacheck-faker` = project
.in(file("."))
.settings(
libraryDependencies ++= Seq(
ScalaCheck,
TypesafeConfig,
PureConfig,
ApacheCommons,
ScalaParsingCombinators,
Munit.core % Test,
Munit.scalacheck % Test,
Munit.catsEffect % Test,
Munit.scalacheckEffect % Test,
Weaver.cats % Test,
Weaver.scalacheck % Test
),
Test / fork := true,
tlJdkRelease := Some(8),
Test / testOptions ++=
List(Tests.Argument(TestFrameworks.MUnit, "+l")),
scalacOptions ++= {
if (scalaVersion.value.startsWith("2.13")) Seq("-Xlint:-byname-implicit")
else Nil
}
)
.settings(
addCommandAlias(
"cpl",
";+Test / compile"
),
addCommandAlias(
"fixCheck",
";+Compile / scalafix --check;+Test / scalafix --check"
),
addCommandAlias(
"fix",
";+Compile / scalafix;+Test / scalafix"
),
addCommandAlias(
"fmtCheck",
";+Compile / scalafmtCheck;+Test / scalafmtCheck;scalafmtSbtCheck"
),
addCommandAlias(
"fmt",
";+Compile / scalafmt;+Test / scalafmt;scalafmtSbt"
),
addCommandAlias(
"pretty",
";githubWorkflowGenerate;headerCreateAll;fix;fmt"
),
addCommandAlias(
"prettyCheck",
";headerCheckAll;fixCheck;fmtCheck"
),
addCommandAlias(
"cov",
";clean;coverage;test;coverageReport;coverageOff"
)
)
lazy val docs = project
.in(file("site"))
.enablePlugins(TypelevelSitePlugin)
.settings(
tlSiteHelium := tlSiteHelium.value.site
.mainNavigation(appendLinks =
Seq(
ThemeNavigationSection(
"Other Faker Implementations",
TextLink.external(
"https://github.com/DiUS/java-faker",
"java-faker"
),
TextLink.external(
"https://fakerjs.dev/guide/",
"faker-js"
),
TextLink.external(
"https://faker.readthedocs.io/en/master/",
"faker-py"
),
TextLink.external(
"https://github.com/faker-ruby/faker",
"faker-ruby"
)
)
)
),
tlSiteApiPackage := Some("scalacheck-faker"),
laikaConfig := LaikaConfig.defaults.withConfigValue(
LinkConfig.empty.addSourceLinks(
SourceLinks(
baseUri = "https://github.com/etspaceman/scalacheck-faker/blob/main/",
suffix = "scala"
)
)
)
)
.dependsOn(`scalacheck-faker`)