-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathbuild.sbt
More file actions
142 lines (130 loc) · 3.87 KB
/
Copy pathbuild.sbt
File metadata and controls
142 lines (130 loc) · 3.87 KB
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
import Versions._
sbtPlugin := true
publishMavenStyle := true
enablePlugins(ZioSbtEcosystemPlugin, ZioSbtCiPlugin)
addCommandAlias("test", "scripted")
inThisBuild(
List(
name := "ZIO SBT",
startYear := Some(2022),
scalaVersion := Scala212,
crossScalaVersions := Seq(scalaVersion.value),
developers := List(
Developer("khajavi", "Milad Khajavi", "khajavi@gmail.com", url("https://github.com/khajavi"))
),
ciEnabledBranches := Seq("main")
)
)
lazy val root = project
.in(file("."))
.settings(
headerEndYear := Some(2026),
publish / skip := true
)
.aggregate(
`zio-sbt-githubactions`,
`zio-sbt-website`,
`zio-sbt-ecosystem`,
`zio-sbt-ci`,
`zio-sbt-tests`,
`zio-sbt-source`
)
.enablePlugins(ZioSbtCiPlugin)
lazy val `zio-sbt-tests` =
project
.settings(
stdSettings(),
publish / skip := true,
headerEndYear := Some(2023)
)
lazy val `zio-sbt-website` =
project
.settings(stdSettings())
.settings(
headerEndYear := Some(2023),
scriptedLaunchOpts := {
scriptedLaunchOpts.value ++
Seq("-Xmx1024M", "-Dplugin.version=" + version.value)
},
scriptedBufferLog := false
)
.enablePlugins(SbtPlugin)
lazy val `zio-sbt-ecosystem` =
project
.settings(stdSettings())
.settings(
headerEndYear := Some(2023),
scriptedLaunchOpts := {
scriptedLaunchOpts.value ++
Seq("-Xmx1024M", "-Dplugin.version=" + version.value)
},
scriptedBufferLog := false
)
.enablePlugins(SbtPlugin)
lazy val `zio-sbt-ci` =
project
.settings(stdSettings())
.settings(
headerEndYear := Some(2023),
scriptedLaunchOpts := {
scriptedLaunchOpts.value ++
Seq("-Xmx1024M", "-Dplugin.version=" + version.value)
},
scriptedBufferLog := false
)
.enablePlugins(SbtPlugin)
.dependsOn(`zio-sbt-githubactions`)
lazy val `zio-sbt-githubactions` =
project
.settings(
stdSettings(),
headerEndYear := Some(2023)
)
lazy val `zio-sbt-source` =
project
.settings(
crossScalaVersions := Seq(Scala213, Scala3),
scalaVersion := Scala213,
sbtPlugin := false,
headerEndYear := Some(2026),
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision,
scalacOptions ++= {
if (scalaBinaryVersion.value == "2.13") Seq("-Wunused:imports") else Seq()
},
libraryDependencies ++= Seq(
"org.scalameta" %% "mdoc" % "2.9.1",
"dev.zio" %% "zio-test" % zio % Test,
"dev.zio" %% "zio-test-sbt" % zio % Test
) ++ {
if (scalaBinaryVersion.value == "2.13") Seq("org.scala-lang" % "scala-reflect" % scalaVersion.value)
else Seq()
},
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")
)
lazy val docs = project
.in(file("zio-sbt-docs"))
.settings(
moduleName := "zio-sbt-docs",
scalacOptions -= "-Yno-imports",
scalacOptions -= "-Xfatal-warnings",
projectName := (ThisBuild / name).value,
mainModuleName := (`zio-sbt-website` / moduleName).value,
projectStage := ProjectStage.ProductionReady,
ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(`zio-sbt-website`),
headerLicense := None,
readmeContribution := readmeContribution.value +
"""|
|#### TL;DR
|
|Before you submit a PR, make sure your tests are passing, and that the code is properly formatted
|
|```
|sbt prepare
|
|sbt +test
|```
|""".stripMargin
)
.dependsOn(`zio-sbt-website`)
.enablePlugins(WebsitePlugin)