forked from BenFradet/struct-type-encoder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
111 lines (102 loc) · 2.88 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
lazy val buildSettings = Seq(
organization := "com.github.benfradet",
version := "0.2.0-SNAPSHOT",
scalaVersion := "2.11.11"
)
lazy val compilerOptions = Seq(
"-deprecation",
"-encoding", "UTF-8",
"-feature",
"-language:higherKinds",
"-unchecked",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Xfuture",
"-Xlint"
)
lazy val shapelessVersion = "2.3.2"
lazy val sparkVersion = "2.1.0"
lazy val scalatestVersion = "3.0.1"
lazy val baseSettings = Seq(
libraryDependencies ++= Seq(
"com.chuusai" %% "shapeless" % shapelessVersion,
"org.apache.spark" %% "spark-sql" % sparkVersion
) ++ Seq(
"org.scalatest" %% "scalatest" % scalatestVersion
).map(_ % "test"),
scalacOptions ++= compilerOptions
)
lazy val publishSettings = Seq(
publishMavenStyle := true,
publishArtifact := true,
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
licenses := Seq("Apache 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
homepage := Some(url("https://github.com/BenFradet/struct-type-encoder")),
scmInfo := Some(
ScmInfo(
url("https://github.com/BenFradet/struct-type-encoder"),
"scm:git:[email protected]:BenFradet/struct-type-encoder.git"
)
),
pomExtra :=
<developers>
<developer>
<id>BenFradet</id>
<name>Ben Fradet</name>
<url>https://benfradet.github.io/</url>
</developer>
</developers>
)
lazy val noPublishSettings = Seq(
publish := {},
publishLocal := {},
publishArtifact := false
)
lazy val allSettings = buildSettings ++ baseSettings ++ publishSettings
lazy val structTypeEncoder = (project in file("."))
.settings(allSettings)
.settings(noPublishSettings)
.settings(
initialCommands in console :=
"""
|import ste.StructTypeEncoder
|import ste.StructTypeEncoder._
""".stripMargin
)
.aggregate(core, benchmarks)
.dependsOn(core)
lazy val core = project
.settings(moduleName := "struct-type-encoder")
.settings(allSettings)
lazy val benchmarks = project
.settings(moduleName := "struct-type-encoder-benchmarks")
.enablePlugins(JmhPlugin)
.settings(allSettings)
.settings(noPublishSettings)
.settings(
javaOptions in run ++= Seq(
"-Djava.net.preferIPv4Stack=true",
"-XX:+AggressiveOpts",
"-XX:+UseParNewGC",
"-XX:+UseConcMarkSweepGC",
"-XX:+CMSParallelRemarkEnabled",
"-XX:+CMSClassUnloadingEnabled",
"-XX:ReservedCodeCacheSize=128m",
"-Xss8M",
"-Xms512M",
"-XX:SurvivorRatio=128",
"-XX:MaxTenuringThreshold=0",
"-Xss8M",
"-Xms512M",
"-Xmx2G",
"-server"
)
)
.dependsOn(core)