forked from ShellRechargeSolutionsEU/docile-charge-point
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
81 lines (70 loc) · 2.41 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 commonSettings = Seq(
organization := "com.newmotion",
scalaVersion := "2.12.11",
crossScalaVersions := Seq("2.12.11"),
scalacOptions ++= Seq("-Xlint:-nullary-unit"),
javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint")
)
lazy val commandLine = (project in file("cmd"))
.dependsOn(core)
.dependsOn(loader)
.settings(
commonSettings,
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,
name := "docile-charge-point",
libraryDependencies ++= coreDeps
)
lazy val loader = (project in file("loader"))
.dependsOn(core)
.settings(
commonSettings,
libraryDependencies ++= loaderDeps(scalaVersion.value),
name := "docile-charge-point-loader"
)
lazy val lambda = (project in file("aws-lambda"))
.dependsOn(core)
.dependsOn(loader)
.settings(
commonSettings,
name := "docile-charge-point-lambda",
retrieveManaged := true,
libraryDependencies ++= awsDeps,
mainClass := Some("chargepoint.docile.Lambda"),
assemblyJarName in assembly := "docile-lambda.jar"
)
lazy val coreDeps = Seq(
"com.thenewmotion.ocpp" %% "ocpp-j-api" % "9.2.3", //you need to compile this locally first
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.0",
"org.specs2" %% "specs2-core" % "4.3.4" % "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"
)
lazy val awsDeps = Seq(
"com.amazonaws" % "aws-java-sdk-s3" % "1.11.337",
"com.amazonaws" % "aws-java-sdk-lambda" % "1.11.337",
"com.amazonaws" % "aws-lambda-java-core" % "1.2.0",
"com.amazonaws" % "aws-lambda-java-events" % "1.2.0"
)
commonSettings
name := "docile-charge-point-root"