This repository was archived by the owner on Jul 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sbt
More file actions
152 lines (129 loc) · 4.46 KB
/
build.sbt
File metadata and controls
152 lines (129 loc) · 4.46 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
143
144
145
146
147
148
149
150
151
152
import de.heikoseeberger.sbtheader.License
import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
import sbtcrossproject.CrossPlugin.autoImport.crossProject
name := "codec"
scalacOptions in Compile ++= Seq("-Ypartial-unification", "-Xdisable-assertions")
javaOptions in Test ++= Seq("-ea")
skip in publish := true // Skip root project
val scalaV = scalaVersion := "2.12.8"
val commons = Seq(
scalaV,
//crossScalaVersions := Seq(scalaVersion.value, "2.13.0-RC1"),
version := "0.0.5",
fork in Test := true,
parallelExecution in Test := false,
organization := "one.fluence",
organizationName := "Fluence Labs Limited",
organizationHomepage := Some(new URL("https://fluence.one")),
startYear := Some(2017),
licenses += ("AGPL-V3", new URL("http://www.gnu.org/licenses/agpl-3.0.en.html")),
headerLicense := Some(License.AGPLv3("2017", organizationName.value)),
bintrayOrganization := Some("fluencelabs"),
publishMavenStyle := true,
bintrayRepository := "releases"
)
commons
val kindProjector = addCompilerPlugin("org.typelevel" % "kind-projector" % "0.10.0" cross CrossVersion.binary)
val Cats1V = "1.6.0"
val ScodecBitsV = "1.1.10"
val CirceV = "0.11.1"
val ShapelessV = "2.3.+"
val chill = "com.twitter" %% "chill" % "0.9.3"
val ScalatestV = "3.0.5"
// Note that cats-laws 1.5 are compiled against scalacheck 1.13, and scalacheck-shapeless should also not introduce the upgrade
val ScalacheckV = "1.13.5"
val protobuf = Seq(
PB.targets in Compile := Seq(
scalapb.gen() -> (sourceManaged in Compile).value
),
libraryDependencies ++= Seq(
"com.thesamet.scalapb" %% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion % "protobuf"
)
)
enablePlugins(AutomateHeaderPlugin)
lazy val `codec-core` = crossProject(JVMPlatform, JSPlatform)
.withoutSuffixFor(JVMPlatform)
.crossType(FluenceCrossType)
.in(file("core"))
.settings(
commons,
kindProjector,
libraryDependencies ++= Seq(
"org.typelevel" %%% "cats-core" % Cats1V,
"org.typelevel" %%% "cats-testkit" % Cats1V % Test,
"com.github.alexarchambault" %%% "scalacheck-shapeless_1.13" % "1.1.8" % Test,
"org.scalacheck" %%% "scalacheck" % ScalacheckV % Test,
"org.scalatest" %%% "scalatest" % ScalatestV % Test
)
)
.jsSettings(
fork in Test := false
)
.enablePlugins(AutomateHeaderPlugin)
lazy val `codec-core-jvm` = `codec-core`.jvm
lazy val `codec-core-js` = `codec-core`.js
lazy val `codec-bits` = crossProject(JVMPlatform, JSPlatform)
.withoutSuffixFor(JVMPlatform)
.crossType(FluenceCrossType)
.in(file("bits"))
.settings(
commons,
libraryDependencies ++= Seq(
"org.scodec" %%% "scodec-bits" % ScodecBitsV,
"org.scalacheck" %%% "scalacheck" % ScalacheckV % Test,
"org.scalatest" %%% "scalatest" % ScalatestV % Test
)
)
.jsSettings(
fork in Test := false
)
.enablePlugins(AutomateHeaderPlugin)
.dependsOn(`codec-core`)
lazy val `codec-bits-js` = `codec-bits`.js
lazy val `codec-bits-jvm` = `codec-bits`.jvm
lazy val `codec-circe` = crossProject(JVMPlatform, JSPlatform)
.withoutSuffixFor(JVMPlatform)
.crossType(FluenceCrossType)
.in(file("circe"))
.settings(
commons,
libraryDependencies ++= Seq(
"io.circe" %%% "circe-core" % CirceV,
"io.circe" %%% "circe-parser" % CirceV,
"org.scalatest" %%% "scalatest" % ScalatestV % Test
)
)
.jsSettings(
fork in Test := false
)
.enablePlugins(AutomateHeaderPlugin)
.dependsOn(`codec-core`)
lazy val `codec-circe-js` = `codec-circe`.js
lazy val `codec-circe-jvm` = `codec-circe`.jvm
lazy val `codec-kryo` = project
.in(file("kryo"))
.settings(
commons,
libraryDependencies ++= Seq(
chill,
"com.chuusai" %% "shapeless" % ShapelessV,
"org.scalatest" %% "scalatest" % ScalatestV % Test
)
)
.dependsOn(`codec-core-jvm`)
lazy val `codec-protobuf` = crossProject(JVMPlatform, JSPlatform)
.withoutSuffixFor(JVMPlatform)
.crossType(FluenceCrossType)
.in(file("protobuf"))
.settings(
commons,
protobuf
)
.jsSettings(
fork in Test := false,
scalaJSModuleKind := ModuleKind.CommonJSModule
)
.enablePlugins(AutomateHeaderPlugin)
.dependsOn(`codec-core`)
lazy val `codec-protobuf-jvm` = `codec-protobuf`.jvm
lazy val `codec-protobuf-js` = `codec-protobuf`.js