This repository has been archived by the owner on May 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.sbt
135 lines (114 loc) · 4.22 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
import sbtunidoc.BaseUnidocPlugin.autoImport._
import sbtunidoc.ScalaUnidocPlugin.autoImport._
lazy val root = (project in file("."))
.settings(noPublishSettings)
.aggregate(coreJVM, coreJS)
.aggregate(genericJVM, genericJS)
.aggregate(typesafeJVM)
.aggregate(shoconJS, shoconJVM)
.aggregate(catsJVM, catsJS)
.aggregate(allTests)
.aggregate(docs)
lazy val core =
module("core")
.settings(unmanagedSourceDirectories in Compile := Nil)
.settings(unmanagedSourceDirectories in Test := Nil)
.settings(yax(file("modules/core/src/main/scala"), Compile, Nil,
yaxScala = true, yaxPlatform = true))
lazy val coreJS = core.js
lazy val coreJVM = core.jvm
lazy val generic =
module("generic")
.dependsOn(core)
.crossDepSettings(Seq(%%("shapeless")): _*)
.settings(
libraryDependencies += compilerPlugin("com.github.wheaties" %% "twotails" % V.twoTails cross CrossVersion.full),
ivyConfigurations += config("compile-only").hide,
libraryDependencies += "com.github.wheaties" %% "twotails-annotations" % V.twoTails % "compile-only" cross CrossVersion.full,
unmanagedClasspath in Compile ++= update.value.select(configurationFilter("compile-only"))
)
lazy val genericJS = generic.js
lazy val genericJVM = generic.jvm
lazy val typesafeJVM =
module("config-typesafe", hideFolder = true)
.dependsOn(core)
.settings(libraryDependencies += %("config", V.typesafeConfig))
.settings(yax(file("modules/config"), Compile, "typesafe" :: Nil))
.jvm
lazy val shocon =
module("config-shocon", hideFolder = true)
.dependsOn(core)
.crossDepSettings(Seq(%%("cats"), %%("shocon")): _*)
.settings(libraryDependencies ++= Seq(%("scala-reflect", scalaVersion.value) % "provided"))
.settings(yax(file("modules/config"), Compile, "shocon" :: Nil))
lazy val shoconJS = shocon.js
lazy val shoconJVM = shocon.jvm
lazy val cats =
module("cats")
.dependsOn(core)
.crossDepSettings(Seq(%%("cats")): _*)
lazy val catsJS = cats.js
lazy val catsJVM = cats.jvm
lazy val allTests = (project in file(".all-tests"))
.settings(noPublishSettings)
.aggregate(testsJS, testsJVM)
.aggregate(testsTypesafeJVM)
.aggregate(testsShoconJS, testsShoconJVM)
lazy val testing =
module("testing")
.settings(noPublishSettings)
.crossDepSettings(testsSettings: _*)
.settings(coverageExcludedPackages := "classy\\.testing\\..*")
.dependsOn(core, generic, cats)
lazy val testingJS = testing.js
lazy val testingJVM = testing.jvm
lazy val tests =
module("tests")
.settings(noPublishSettings)
.crossDepSettings(testsSettings.map(_ % "test"): _*)
.dependsOn(testing)
.dependsOn(core, generic, cats)
lazy val testsJS = tests.js
lazy val testsJVM = tests.jvm
lazy val testsTypesafeJVM =
module("tests-config-typesafe", hideFolder = true)
.jvm
.settings(noPublishSettings)
.settings(libraryDependencies ++= testsSettings.map(_ % "test"): _*)
.dependsOn(testingJVM)
.dependsOn(coreJVM, genericJVM)
.dependsOn(typesafeJVM)
.settings(yax(file("modules/tests-config"), Test, "typesafe" :: Nil))
lazy val testsShocon =
module("tests-config-shocon", hideFolder = true)
.settings(noPublishSettings)
.crossDepSettings(testsSettings.map(_ % "test"): _*)
.dependsOn(testing)
.dependsOn(core, generic)
.dependsOn(shocon)
.settings(yax(file("modules/tests-config"), Test, "shocon" :: Nil))
lazy val testsShoconJS = testsShocon.js
lazy val testsShoconJVM = testsShocon.jvm
lazy val docs: Project =
jvmModule("docs")
.enablePlugins(MicrositesPlugin)
.enablePlugins(ScalaUnidocPlugin)
.dependsOn(coreJVM)
.dependsOn(catsJVM)
.dependsOn(genericJVM)
.dependsOn(typesafeJVM)
.settings(noPublishSettings)
.settings(
unidocProjectFilter in(ScalaUnidoc, unidoc) := inProjects(coreJVM, genericJVM, catsJVM, typesafeJVM, docs))
.settings(docsSettings)
lazy val readme =
jvmModule("readme")
.dependsOn(coreJVM)
.dependsOn(catsJVM)
.dependsOn(genericJVM)
.dependsOn(typesafeJVM)
.settings(noPublishSettings)
.settings(readmeSettings)
pgpPassphrase := Some(getEnvVar("PGP_PASSPHRASE").getOrElse("").toCharArray)
pgpPublicRing := file(s"$gpgFolder/pubring.asc")
pgpSecretRing := file(s"$gpgFolder/secring.asc")