-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sbt
111 lines (90 loc) · 3.57 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
import sbt.Keys.licenses
val json4sV = "3.6.7"
val specs2V = "4.8.1"
val slf4jV = "1.7.30"
val json4sNative = "org.json4s" %% "json4s-native" % json4sV
val javaWebSocket = "org.java-websocket" % "Java-WebSocket" % "1.4.0"
val slf4jApi = "org.slf4j" % "slf4j-api" % slf4jV
val slf4jSimple = "org.slf4j" % "slf4j-simple" % slf4jV
val specs2 = "org.specs2" %% "specs2-core" % specs2V % "it,test"
val specs2Mock = "org.specs2" %% "specs2-mock" % specs2V % "test"
val scalaCheck = "org.scalacheck" %% "scalacheck" % "1.14.3" % "test"
val specs2ScalaCheck = "org.specs2" %% "specs2-scalacheck" % specs2V % "test"
val json4sjackson = "org.json4s" %% "json4s-jackson" % json4sV % "test"
val jsonSchemaValidator = "com.github.java-json-tools" % "json-schema-validator" % "2.2.11" % "test"
val mockServer = "org.mock-server" % "mockserver-client-java" % "5.8.0" % "test"
val mockServerNetty = "org.mock-server" % "mockserver-netty" % "5.8.0" % "test"
def module(name: String) = Project(name, file(name))
.configs(IntegrationTest)
.settings(
organization := "com.infuse-ev",
libraryDependencies += specs2,
Defaults.itSettings,
publishSettings
)
val publishSettings = Seq(
publishTo := sonatypePublishToBundle.value,
sonatypeCredentialHost := "s01.oss.sonatype.org",
scmInfo := Some(ScmInfo(
url("https://github.com/IHomer/scala-ocpp"),
"scm:git@github.com:IHomer/scala-ocpp.git"
)),
description := "Scala library for Open Charge Point Protocol (OCPP). Originally developed by NewMotion, now maintained by IHomer",
licenses := Seq("GPLv3" -> new URL("https://www.gnu.org/licenses/gpl-3.0.en.html")),
homepage := Some(url("https://github.com/IHomer/scala-ocpp")),
developers := List(
Developer(id="t3hnar", name="Yaroslav Klymko", email="t3hnar@gmail.com", url=url("https://github.com/t3hnar")),
Developer(id="tux_rocker", name="Reinier Lamers", email="reinier.lamers@ihomer.nl", url=url("https://reinier.de/"))
)
)
val messages = module("ocpp-messages")
val json = module("ocpp-json")
.dependsOn(messages)
.settings(
libraryDependencies ++= Seq(
json4sNative, slf4jApi, scalaCheck, specs2ScalaCheck, jsonSchemaValidator, json4sjackson
)
)
val ocppJApi =
module("ocpp-j-api")
.dependsOn(messages, json)
.settings(
libraryDependencies ++= Seq(
javaWebSocket, slf4jApi, specs2Mock, mockServer, mockServerNetty),
(fork in IntegrationTest) := true
)
val exampleJsonClient =
module("example-json-client")
.dependsOn(json, ocppJApi)
.settings(
libraryDependencies += slf4jSimple,
outputStrategy in run := Some(StdoutOutput),
coverageExcludedPackages := ".*",
publish := {}
)
val exampleJsonServer =
module("example-json-server")
.dependsOn(json, ocppJApi)
.settings(
libraryDependencies += slf4jSimple,
outputStrategy in run := Some(StdoutOutput),
connectInput in run := true,
coverageExcludedPackages := ".*",
publish := {}
)
val exampleJsonServer20 =
module("example-json-server-20")
.dependsOn(json, ocppJApi)
.settings(
libraryDependencies += slf4jSimple,
outputStrategy in run := Some(StdoutOutput),
connectInput in run := true,
coverageExcludedPackages := ".*",
publish := {}
)
crossScalaVersions := Seq("2.13.1", "2.12.10", "2.11.12")
// don't publish the outer enclosing project, i.e. "com.infuse-ev" % "scala-ocpp"
publish / skip := true
// publishing settings needed at the top level project when running "sonatypeBundleRelease"
sonatypeCredentialHost := "s01.oss.sonatype.org"
sonatypeProfileName := "com.infuse-ev"