-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
118 lines (113 loc) · 5.18 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
import ReleaseTransformations._
import sbt.Keys._
import sbt.Tests
import sbtassembly.AssemblyPlugin.autoImport._
import sbtbuildinfo.BuildInfoPlugin.autoImport._
import sbtrelease.ReleasePlugin.autoImport._
lazy val commonSettings = Seq(
organization := "io.tinkermic",
homepage := Some(url("https://github.com/analytically/tinkermic")),
scalaVersion := "2.11.8"
)
val tinkerpopVersion = "3.3.1"
lazy val tinkermic = (project in file(".")).
disablePlugins(sbtassembly.AssemblyPlugin).
settings(commonSettings: _*).
aggregate(gremlin, benchmark)
lazy val gremlin = (project in file("tinkermic-gremlin")).
enablePlugins(BuildInfoPlugin).
settings(commonSettings: _*).
settings(
name := "tinkermic-gremlin",
buildInfoPackage := "com.tinkermic.gremlin",
buildInfoKeys ++= Seq[BuildInfoKey](
resolvers,
libraryDependencies,
BuildInfoKey.action("gitRevision") {
("git rev-parse --short HEAD" !!).trim
}
),
buildInfoOptions += BuildInfoOption.BuildTime,
buildInfoOptions += BuildInfoOption.ToJson,
assemblyJarName in assembly := "tinkermic-gremlin.jar",
assemblyMergeStrategy in assembly := {
case PathList(ps@_*) if ps.last == "HornetQUtilBundle_$bundle.class" => MergeStrategy.first // datomic
case PathList(ps@_*) if ps.last == "groovy-release-info.properties" => MergeStrategy.first // tinkerpop
case x =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
oldStrategy(x)
},
publishMavenStyle := true,
crossPaths := false,
javacOptions in (Compile, compile) ++= Seq(
"-source", "1.8",
"-target", "1.8",
"-encoding", "UTF-8",
"-Xlint:unchecked",
"-Xlint:deprecation"
),
javacOptions in (Compile,doc) ++= Seq("-notimestamp", "-link", "http://tinkerpop.apache.org/javadocs/current/full/", "-link", "https://docs.oracle.com/javase/8/docs/api/"),
javaOptions in Test += "-Ddatomic.objectCacheMax=256m",
testOptions += Tests.Argument(TestFrameworks.JUnit, "-q", "-a"),
fork := true,
parallelExecution in Test := false,
resolvers += "clojars" at "https://clojars.org/repo",
resolvers += "jitpack" at "https://jitpack.io",
resolvers += "clojars" at "https://clojars.org/repo",
resolvers += "my.datomic.com" at "https://my.datomic.com/repo",
credentials += Credentials(realm = "Datomic Maven Repo", host = "my.datomic.com", userName = "[email protected]", passwd = "5fd44b06-2597-44e9-b9f9-4c5e204f62f8"),
libraryDependencies ++= Seq(
"org.slf4j" % "slf4j-api" % "1.7.25",
"org.apache.tinkerpop" % "gremlin-core" % tinkerpopVersion exclude("org.slf4j", "slf4j-log4j12"),
"org.apache.tinkerpop" % "gremlin-groovy" % tinkerpopVersion % Provided exclude("org.slf4j", "slf4j-log4j12"),
"com.datomic" % "datomic-pro" % "0.9.5561.62" exclude("org.slf4j", "slf4j-nop") exclude("org.slf4j", "log4j-over-slf4j"),
"org.threeten" % "threeten-extra" % "1.2",
"org.apache.tinkerpop" % "gremlin-test" % tinkerpopVersion % Test exclude("org.slf4j", "slf4j-log4j12"),
"ch.qos.logback" % "logback-classic" % "1.2.3" % Test,
"junit" % "junit" % "4.12" % Test,
"com.novocode" % "junit-interface" % "0.11" % Test
),
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishArtifacts,
setNextVersion,
commitNextVersion,
pushChanges
)
)
lazy val benchmark = (project in file("tinkermic-gremlin-benchmark")).
settings(commonSettings: _*).
settings(
name := "tinkermic-gremlin-benchmark",
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.2.3",
"org.apache.tinkerpop" % "gremlin-test" % tinkerpopVersion exclude("org.slf4j", "slf4j-log4j12"),
"org.apache.tinkerpop" % "neo4j-gremlin" % tinkerpopVersion exclude("org.slf4j", "slf4j-log4j12"),
"org.neo4j" % "neo4j-tinkerpop-api-impl" % "0.7-3.2.3",
"org.apache.tinkerpop" % "tinkergraph-gremlin" % tinkerpopVersion exclude("org.slf4j", "slf4j-log4j12"),
"org.openjdk.jmh" % "jmh-core" % "1.19",
"org.openjdk.jmh" % "jmh-generator-annprocess" % "1.19"
),
crossPaths := false,
assemblyJarName in assembly := "tinkermic-gremlin-benchmark.jar",
assemblyMergeStrategy in assembly := {
case PathList(ps@_*) if ps.last == "HornetQUtilBundle_$bundle.class" => MergeStrategy.first // datomic
case PathList(ps@_*) if ps.last == "groovy-release-info.properties" => MergeStrategy.first // tinkerpop
case PathList("org", "hamcrest", xs@_*) => MergeStrategy.last
case PathList(ps@_*) if ps.last == "LICENSES.txt" => MergeStrategy.first // neo4j
case PathList(ps@_*) if ps.last == "modules.properties" => MergeStrategy.first // neo4j
case PathList(ps@_*) if ps.last == "pom.xml" => MergeStrategy.first // neo4j
case x =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
oldStrategy(x)
},
publishArtifact := false,
mainClass in assembly := Some("com.tinkermic.benchmark.Main")
).dependsOn(gremlin)