This repository has been archived by the owner on Mar 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
/
build.sbt
176 lines (167 loc) · 5.25 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
import Dependencies.{bloomFilter, _}
val scalligraphVersion = "0.1.0-SNAPSHOT"
val scala212 = "2.12.13"
val scala213 = "2.13.1"
val supportedScalaVersions = List(scala212, scala213)
organization in ThisBuild := "org.thp"
scalaVersion in ThisBuild := scala212
crossScalaVersions in ThisBuild := supportedScalaVersions
resolvers in ThisBuild ++= Seq(
Resolver.mavenLocal,
"Oracle Released Java Packages" at "https://download.oracle.com/maven",
"TheHive project repository" at "https://dl.bintray.com/thehive-project/maven/"
)
scalacOptions in ThisBuild ++= Seq(
"-encoding",
"UTF-8",
"-deprecation", // Emit warning and location for usages of deprecated APIs.
"-feature", // Emit warning and location for usages of features that should be imported explicitly.
"-unchecked", // Enable additional warnings where generated code depends on assumptions.
//"-Xfatal-warnings", // Fail the compilation if there are any warnings.
"-Xlint", // Enable recommended additional warnings.
// "-Ywarn-adapted-args", // Warn if an argument list is modified to match the receiver.
//"-Ywarn-dead-code", // Warn when dead code is identified.
// "-Ywarn-inaccessible", // Warn about inaccessible types in method signatures.
// "-Ywarn-nullary-override", // Warn when non-nullary overrides nullary, e.g. def foo() over def foo.
"-Ywarn-numeric-widen", // Warn when numerics are widened.
"-Ywarn-value-discard", // Warn when non-Unit expression results are unused
//"-Ylog-classpath",
//"-Xlog-implicits",
//"-Yshow-trees-compact",
//"-Yshow-trees-stringified",
//"-Ymacro-debug-lite",
"-Xlog-free-types",
"-Xlog-free-terms",
"-Xprint-types"
)
fork in Test in ThisBuild := true
// javaOptions += "-Xmx1G",
scalafmtConfig in ThisBuild := file(".scalafmt.conf")
scalacOptions in ThisBuild ++= {
CrossVersion.partialVersion((Compile / scalaVersion).value) match {
case Some((2, n)) if n >= 13 => "-Ymacro-annotations" :: Nil
case _ => Nil
}
}
libraryDependencies in ThisBuild ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) if n >= 13 => Nil
case _ => compilerPlugin(macroParadise) :: Nil
}
}
dependencyOverrides in ThisBuild ++= Seq(
"io.netty" % "netty-all" % "4.0.56.Final",
logbackClassic
)
val securityUpdates = Seq(
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.12.6",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.12.6.1",
"org.yaml" % "snakeyaml" % "1.30"
)
dependencyOverrides in ThisBuild ++= securityUpdates
lazy val scalligraph = (project in file("."))
.dependsOn(core, /*graphql, */ janus /* , orientdb , neo4j, coreTest*/ )
.dependsOn(coreTest % "test -> test")
.aggregate(core, /*graphql, */ janus /* , orientdb, neo4j */, coreTest)
.settings(
name := "scalligraph",
version := scalligraphVersion
)
lazy val core = (project in file("core"))
.settings(
name := "scalligraph-core",
version := scalligraphVersion,
libraryDependencies ++= Seq(
tinkerpop,
scalactic,
playGuice,
scalaGuice,
hadoopClient,
alpakkaS3,
akkaHttp,
akkaHttpXml,
playCore,
apacheConfiguration,
bouncyCastle,
shapeless,
caffeine,
akkaCluster,
akkaClusterTools,
akkaClusterTyped,
specs % Test,
playLogback % Test,
scalaCompiler(scalaVersion.value),
scalaReflect(scalaVersion.value),
ws,
bloomFilter
)
)
lazy val coreTest = (project in file("core-test"))
.dependsOn(core)
.dependsOn(janus)
// .dependsOn(orientdb)
// .dependsOn(neo4j)
.settings(
name := "scalligraph-core-test",
version := scalligraphVersion,
libraryDependencies ++= Seq(
janusGraphInMemory % Test,
specs % Test,
playLogback % Test
)
)
lazy val janus = (project in file("database/janusgraph"))
.dependsOn(core)
.settings(
name := "scalligraph-janusgraph",
version := scalligraphVersion,
libraryDependencies ++= Seq(
janusGraph,
janusGraphBerkeleyDB,
// janusGraphHBase,
janusGraphLucene,
janusGraphElasticSearch,
janusGraphCassandra,
// janusGraphDriver,
// janusGraphCore,
specs % Test
)
)
//lazy val orientdb = (project in file("database/orientdb"))
// .dependsOn(core)
// .settings(
// name := "scalligraph-orientdb",
// version := scalligraphVersion,
// libraryDependencies ++= Seq(
// gremlinScala,
// gremlinOrientdb,
// specs % Test
// )
// )
//
//lazy val neo4j = (project in file("database/neo4j"))
// .dependsOn(core)
// .settings(
// name := "scalligraph-neo4j",
// version := scalligraphVersion,
// libraryDependencies ++= Seq(
// gremlinScala,
// neo4jGremlin,
// neo4jTinkerpop,
// specs % Test
// )
// )
//lazy val graphql = (project in file("graphql"))
// .dependsOn(core)
// .dependsOn(coreTest % "test->test")
// .dependsOn(janus)
// .settings(
// name := "scalligraph-graphql",
// version := scalligraphVersion,
// libraryDependencies ++= Seq(
// scalaGuice,
// sangria,
// sangriaPlay,
// specs % Test
// )
// )