-
Notifications
You must be signed in to change notification settings - Fork 38
/
build.sbt
86 lines (79 loc) · 3.08 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
lazy val commonSettings = Seq(
organization := "ch.megard",
organizationName := "Lomig Mégard",
startYear := Some(2016),
version := "1.2.1-SNAPSHOT",
scalaVersion := "2.13.11",
crossScalaVersions := Seq(scalaVersion.value, "2.12.18", "3.3.0"),
scalacOptions ++= Seq(
"-encoding",
"UTF-8",
"-unchecked",
"-deprecation"
),
javacOptions ++= Seq(
"-encoding",
"UTF-8",
"-source",
"8",
"-target",
"8"
),
homepage := Some(url("https://github.com/lomigmegard/akka-http-cors")),
licenses := Seq("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0.txt")),
scmInfo := Some(
ScmInfo(
url("https://github.com/lomigmegard/akka-http-cors"),
"scm:[email protected]:lomigmegard/akka-http-cors.git"
)
),
developers := List(
Developer(id = "lomigmegard", name = "Lomig Mégard", email = "", url = url("https://lomig.ch"))
)
)
lazy val publishSettings = Seq(
publishMavenStyle := true,
Test / publishArtifact := false,
pomIncludeRepository := { _ => false },
publishTo := sonatypePublishToBundle.value
)
lazy val dontPublishSettings = Seq(
publish / skip := true
)
lazy val root = (project in file("."))
.aggregate(`akka-http-cors`, `akka-http-cors-example`, `akka-http-cors-bench-jmh`)
.settings(commonSettings)
.settings(dontPublishSettings)
lazy val akkaVersion = "2.6.20"
lazy val akkaHttpVersion = "10.2.10"
lazy val `akka-http-cors` = project
.settings(commonSettings)
.settings(publishSettings)
.settings(
// Java 9 Automatic-Module-Name (http://openjdk.java.net/projects/jigsaw/spec/issues/#AutomaticModuleNames)
Compile / packageBin / packageOptions += Package.ManifestAttributes(
"Automatic-Module-Name" -> "ch.megard.akka.http.cors"
),
libraryDependencies += "com.typesafe.akka" %% "akka-http" % akkaHttpVersion cross CrossVersion.for3Use2_13,
libraryDependencies += "com.typesafe.akka" %% "akka-stream" % akkaVersion % Provided cross CrossVersion.for3Use2_13,
libraryDependencies += "com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % Test cross CrossVersion.for3Use2_13,
libraryDependencies += "com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion % Test cross CrossVersion.for3Use2_13,
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.17" % Test
)
lazy val `akka-http-cors-example` = project
.dependsOn(`akka-http-cors`)
.settings(commonSettings)
.settings(dontPublishSettings)
.settings(
libraryDependencies += "com.typesafe.akka" %% "akka-stream" % akkaVersion cross CrossVersion.for3Use2_13,
libraryDependencies += "com.typesafe.akka" %% "akka-actor-typed" % akkaVersion cross CrossVersion.for3Use2_13
// libraryDependencies += "ch.megard" %% "akka-http-cors" % version.value
)
lazy val `akka-http-cors-bench-jmh` = project
.dependsOn(`akka-http-cors`)
.enablePlugins(JmhPlugin)
.settings(commonSettings)
.settings(dontPublishSettings)
.settings(
libraryDependencies += "com.typesafe.akka" %% "akka-stream" % akkaVersion cross CrossVersion.for3Use2_13
)