-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
81 lines (73 loc) · 2.16 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
lazy val coverageSettings = Seq(
coverageMinimum := 60,
coverageFailOnMinimum := false
)
lazy val buildSettings = Seq(
organization := "com.ithaca",
scalaOrganization := "org.typelevel",
scalaVersion := "2.12.0",
name := "hephaestus",
version := "0.1.0-SNAPSHOT"
)
lazy val commonScalacOptions = Seq(
"-encoding",
"UTF-8",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-language:experimental.macros",
"-language:postfixOps",
"-Ypartial-unification",
"-Yliteral-types"
)
lazy val commonResolvers = Seq(
Resolver.sonatypeRepo("releases"),
Resolver.sonatypeRepo("snapshots"),
Resolver.jcenterRepo
)
lazy val commonSettings = Seq(
resolvers := commonResolvers,
scalacOptions ++= commonScalacOptions,
libraryDependencies ++= Seq(
"com.hackoeur" % "jglm" % "1.0.0",
"org.typelevel" %% "cats-core" % "0.9.0",
"org.scodec" %% "scodec-stream" % "1.0.1",
"org.scodec" %% "scodec-cats" % "0.2.0",
"org.spire-math" %% "spire" % "0.13.0",
"com.github.julien-truffaut" %% "monocle-core" % "1.4.0",
"com.github.julien-truffaut" %% "monocle-macro" % "1.4.0",
"org.scalatest" %% "scalatest" % "3.0.1" % "test"
),
addCompilerPlugin("org.spire-math" %% "kind-projector" % "0.9.3")
) ++ coverageSettings ++ buildSettings
lazy val core = (project in file("core"))
.settings(
moduleName := "hephaestus-core",
commonSettings,
target in javah := (target in LocalProject("native")).value / "include"
)
.dependsOn(native % Runtime)
lazy val native = (project in file("native"))
.enablePlugins(JniNative)
.settings(
moduleName := "hephaestus-native",
buildSettings,
sourceDirectory in nativeCompile := baseDirectory.value,
compile in Compile := {
Def
.sequential(
javah in LocalProject("core"),
nativeCompile
)
.value
(compile in Compile).value
}
)
lazy val samples = (project in file("samples"))
.settings(
moduleName := "hephaestus-samples",
buildSettings,
commonSettings
)
.dependsOn(core, native)
lazy val root = (project in file(".")).aggregate(core, native, samples)