-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
111 lines (86 loc) · 3.21 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
val mScalaVersion = "2.12.13"
val mInterfacesVersion = "1.0.0"
val mCommonsVersion = "1.0.0"
val mBootloaderVersion = "1.0.0"
val mCrossVersion = """^(\d+\.\d+)""".r.findFirstIn(mScalaVersion).get
val exclusionRules = Seq(
ExclusionRule("org.scala-lang", "scala-library"),
ExclusionRule("org.scala-lang", "scala-reflect"),
ExclusionRule("org.scala-lang", "scala-compiler"),
ExclusionRule("com.typesafe", "config"),
ExclusionRule("systems.opalia", s"interfaces_$mCrossVersion"),
ExclusionRule("org.osgi", "org.osgi.core"),
ExclusionRule("org.osgi", "org.osgi.service.component"),
ExclusionRule("org.osgi", "org.osgi.compendium")
)
def commonSettings: Seq[Setting[_]] = {
Seq(
organizationName := "Opalia Systems",
organizationHomepage := Some(url("https://opalia.systems")),
organization := "systems.opalia",
homepage := Some(url("https://github.com/OpaliaSystems/opalia-service-http")),
version := "1.1.0",
scalaVersion := mScalaVersion
)
}
lazy val `testing` =
(project in file("testing"))
.dependsOn(`http-api`)
.settings(
name := "testing",
commonSettings,
parallelExecution in ThisBuild := false,
libraryDependencies ++= Seq(
"systems.opalia" %% "interfaces" % mInterfacesVersion,
"systems.opalia" %% "commons" % mCommonsVersion,
"systems.opalia" %% "bootloader" % mBootloaderVersion,
"org.scalatest" %% "scalatest" % "3.2.5" % "test"
)
)
lazy val `http-api` =
(project in file("http-api"))
.settings(
name := "http-api",
description := "The project provides an API for working with HTTP server/client.",
commonSettings,
bundleSettings,
OsgiKeys.importPackage ++= Seq(
"scala.*",
"com.typesafe.config.*",
"systems.opalia.interfaces.*"
),
OsgiKeys.exportPackage ++= Seq(
"systems.opalia.service.http.api.*"
),
libraryDependencies ++= Seq(
"systems.opalia" %% "interfaces" % mInterfacesVersion % "provided"
)
)
lazy val `http-impl-akka` =
(project in file("http-impl-akka"))
.dependsOn(`http-api`)
.settings(
name := "http-impl-akka",
description := "The project provides a HTTP server/client implementation based on Akka HTTP.",
commonSettings,
bundleSettings,
OsgiKeys.privatePackage ++= Seq(
"systems.opalia.service.http.impl.*"
),
OsgiKeys.importPackage ++= Seq(
"scala.*",
"com.typesafe.config.*",
"systems.opalia.interfaces.*",
"systems.opalia.service.http.api.*"
),
libraryDependencies ++= Seq(
"org.osgi" % "osgi.core" % "8.0.0" % "provided",
"org.osgi" % "org.osgi.service.component.annotations" % "1.4.0",
"org.osgi" % "org.osgi.service.log" % "1.5.0",
"systems.opalia" %% "interfaces" % mInterfacesVersion % "provided",
"systems.opalia" %% "commons" % mCommonsVersion excludeAll (exclusionRules: _*),
"com.typesafe.akka" %% "akka-http" % "10.2.4" excludeAll (exclusionRules: _*),
"com.typesafe.akka" %% "akka-stream" % "2.6.13" excludeAll (exclusionRules: _*),
"com.typesafe.akka" %% "akka-osgi" % "2.6.13" excludeAll (exclusionRules: _*)
)
)