This repository has been archived by the owner on Mar 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.sbt
102 lines (92 loc) · 3.12 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
import sbtcrossproject.CrossPlugin.autoImport.crossProject
import explicitdeps.ExplicitDepsPlugin.autoImport.moduleFilterRemoveValue
import BuildHelper._
inThisBuild(
List(
name := "zio-macros",
organization := "dev.zio",
homepage := Some(url("https://github.com/zio/zio-macros")),
developers := List(
Developer(
"mschuwalow",
"Maxim Schuwalow",
url("https://github.com/mschuwalow")
),
Developer(
"ioleo",
"Piotr Gołębiewski",
url("https://github.com/ioleo")
)
),
scmInfo := Some(
ScmInfo(
homepage.value.get,
"scm:git:[email protected]:zio/zio-macros.git"
)
),
licenses := Seq("Apache-2.0" -> url(s"${scmInfo.value.map(_.browseUrl).get}/blob/v${version.value}/LICENSE")),
pgpPassphrase := sys.env.get("PGP_PASSWORD").map(_.toArray),
pgpPublicRing := file("/tmp/public.asc"),
pgpSecretRing := file("/tmp/secret.asc")
)
)
ThisBuild / publishTo := sonatypePublishToBundle.value
addCommandAlias("fmt", "all scalafmtSbt scalafmt test:scalafmt")
addCommandAlias("check", "all scalafmtSbtCheck scalafmtCheck test:scalafmtCheck")
addCommandAlias("testJVM", ";coreExamplesJVM/compile;testExamplesJVM/compile;coreTestsJVM/test;testTestsJVM/test")
addCommandAlias("testJS", ";coreExamplesJS/compile;testExamplesJS/compile;coreTestsJS/test;testTestsJS/test")
addCommandAlias("testRelease", ";set every isSnapshot := false;+clean;+compile")
lazy val root = project
.in(file("."))
.settings(
skip in publish := true,
unusedCompileDependenciesFilter -= moduleFilter("org.scala-js", "scalajs-library")
)
.aggregate(
core.jvm,
core.js,
coreExamples.jvm,
coreExamples.js,
coreTests.jvm,
coreTests.js,
test.jvm,
test.js,
testExamples.jvm,
testExamples.js,
testTests.jvm,
testTests.js
)
.enablePlugins(ScalaJSPlugin)
lazy val core = crossProject(JSPlatform, JVMPlatform)
.in(file("core"))
.settings(stdSettings("zio-macros-core"))
.settings(macroSettings)
.settings(libraryDependencies += "dev.zio" %% "zio" % zioVersion)
lazy val coreExamples = crossProject(JSPlatform, JVMPlatform)
.in(file("core-examples"))
.dependsOn(core)
.settings(stdSettings("zio-macros-core-examples"))
.settings(examplesSettings)
lazy val coreTests = crossProject(JSPlatform, JVMPlatform)
.in(file("core-tests"))
.dependsOn(core)
.settings(stdSettings("zio-macros-core-tests"))
.settings(testSettings)
lazy val test = crossProject(JSPlatform, JVMPlatform)
.in(file("test"))
.dependsOn(core)
.settings(stdSettings("zio-macros-test"))
.settings(macroSettings)
.settings(libraryDependencies += "dev.zio" %% "zio-test" % zioVersion)
lazy val testExamples = crossProject(JSPlatform, JVMPlatform)
.in(file("test-examples"))
.dependsOn(test)
.settings(stdSettings("zio-macros-test-examples"))
.settings(examplesSettings)
lazy val testTests = crossProject(JSPlatform, JVMPlatform)
.in(file("test-tests"))
.dependsOn(test)
.settings(stdSettings("zio-macros-test-tests"))
.settings(testSettings)