forked from ShellRechargeSolutionsEU/docile-charge-point
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
89 lines (73 loc) · 2.6 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
lazy val commonSettings = Seq(
organization := "com.infuse-ev",
scalaVersion := "2.12.11",
crossScalaVersions := Seq("2.12.11"),
scalacOptions ++= Seq("-Xlint:-nullary-unit"),
javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint")
)
val publishSettings = Seq(
publishTo := sonatypePublishToBundle.value,
sonatypeCredentialHost := "s01.oss.sonatype.org",
scmInfo := Some(ScmInfo(
url("https://github.com/IHomer/docile-charge-point"),
"scm:[email protected]:IHomer/docile-charge-point.git"
)),
description := "Scriptable OCPP charge point simulator",
licenses := Seq("GPLv3" -> new URL("https://www.gnu.org/licenses/gpl-3.0.en.html")),
homepage := Some(url("https://github.com/IHomer/docile-charge-point")),
developers := List(
Developer(id="tux_rocker", name="Reinier Lamers", email="[email protected]", url=url("http://reinier.de/"))
)
)
lazy val commandLine = (project in file("cmd"))
.dependsOn(core)
.dependsOn(loader)
.settings(
commonSettings,
publishSettings,
name := "docile-charge-point-command-line",
libraryDependencies ++= commandLineDeps,
mainClass := Some("chargepoint.docile.Main"),
assemblyJarName in assembly := "docile.jar",
assemblyMergeStrategy in assembly := {
case "reflect.properties" =>
MergeStrategy.concat
case x =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
oldStrategy(x)
},
connectInput in run := true
)
lazy val core = (project in file("core"))
.settings(
commonSettings,
publishSettings,
name := "docile-charge-point",
libraryDependencies ++= coreDeps
)
lazy val loader = (project in file("loader"))
.dependsOn(core)
.settings(
commonSettings,
publishSettings,
libraryDependencies ++= loaderDeps(scalaVersion.value),
name := "docile-charge-point-loader"
)
lazy val coreDeps = Seq(
"com.infuse-ev" %% "ocpp-j-api" % "9.2.4",
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.0",
"org.scalatest" %% "scalatest" % "3.2.2" % "test",
"org.scalamock" %% "scalamock" % "5.1.0" % "test"
)
def loaderDeps(scalaVersion: String) = Seq(
"org.scala-lang" % "scala-compiler" % scalaVersion,
)
lazy val commandLineDeps = Seq(
"com.lihaoyi" % "ammonite" % "2.1.4" cross CrossVersion.full,
"org.rogach" %% "scallop" % "3.1.3",
"ch.qos.logback" % "logback-classic" % "1.2.3"
)
commonSettings
publishSettings
name := "docile-charge-point-root"
publish / skip := true