-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.sbt
112 lines (100 loc) · 3.66 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
import Keys.{`package` => packageTask}
import BuildHelper._
import Dependencies._
inThisBuild(
List(
organization := "dev.zio",
homepage := Some(url("https://zio.dev/zio-profiling/")),
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
developers := List(
Developer("mschuwalow", "Maxim Schuwalow", "maxim.schuwalow@gmail.com", url("https://github.com/mschuwalow"))
),
versionScheme := Some("early-semver")
)
)
addCommandAlias(
"compileSources",
"core/Test/compile; taggingPlugin/compile; taggingPluginTests/compile; examples/compile; benchmarks/compile;"
)
addCommandAlias("testAll", "core/test; taggingPluginTests/test")
addCommandAlias("check", "fixCheck; fmtCheck")
addCommandAlias("fix", "scalafixAll")
addCommandAlias("fixCheck", "scalafixAll --check")
addCommandAlias("fmt", "all scalafmtSbt scalafmtAll")
addCommandAlias("fmtCheck", "all scalafmtSbtCheck scalafmtCheckAll")
addCommandAlias("prepare", "fix; fmt")
lazy val root = project
.in(file("."))
.settings(publish / skip := true)
.aggregate(core, jmh, taggingPlugin, taggingPluginTests, examples, benchmarks, docs)
lazy val core = project
.in(file("zio-profiling"))
.settings(
stdSettings("zio-profiling"),
libraryDependencies ++= Seq(
"dev.zio" %% "zio" % zioVersion,
"dev.zio" %% "zio-streams" % zioVersion,
"org.scala-lang.modules" %% "scala-collection-compat" % collectionCompatVersion,
"dev.zio" %% "zio-test" % zioVersion % Test,
"dev.zio" %% "zio-test-sbt" % zioVersion % Test
),
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")
)
lazy val jmh = project
.in(file("zio-profiling-jmh"))
.dependsOn(core)
.settings(
stdSettings("zio-profiling-jmh"),
libraryDependencies ++= Seq(
"org.openjdk.jmh" % "jmh-core" % jmhVersion
)
)
lazy val taggingPlugin = project
.in(file("zio-profiling-tagging-plugin"))
.settings(
stdSettings("zio-profiling-tagging-plugin"),
extraSourceDirectorySettings,
pluginDefinitionSettings
)
lazy val taggingPluginTests = project
.in(file("zio-profiling-tagging-plugin-tests"))
.dependsOn(core, taggingPlugin % "plugin")
.settings(
stdSettings("zio-profiling-tagging-plugin-tests"),
publish / skip := true,
Compile / scalacOptions += s"-Xplugin:${(taggingPlugin / Compile / packageTask).value.getAbsolutePath}",
libraryDependencies ++= Seq(
"dev.zio" %% "zio-test" % zioVersion % Test,
"dev.zio" %% "zio-test-sbt" % zioVersion % Test
),
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")
)
lazy val examples = project
.in(file("examples"))
.dependsOn(core, taggingPlugin % "plugin")
.settings(
stdSettings("examples"),
publish / skip := true,
scalacOptions += s"-Xplugin:${(taggingPlugin / Compile / packageTask).value.getAbsolutePath}"
)
lazy val benchmarks = project
.in(file("benchmarks"))
.dependsOn(core)
.enablePlugins(JmhPlugin)
.settings(
stdSettings("benchmarks"),
publish / skip := true
)
lazy val docs = project
.in(file("zio-profiling-docs"))
.dependsOn(core)
.enablePlugins(WebsitePlugin)
.settings(
moduleName := "zio-profiling-docs",
scalacOptions -= "-Yno-imports",
scalacOptions -= "-Xfatal-warnings",
projectName := "ZIO Profiling",
mainModuleName := (core / moduleName).value,
projectStage := ProjectStage.Concept,
ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(core)
)