forked from lightbend/ssl-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
54 lines (47 loc) · 1.9 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
import com.typesafe.sbt.osgi.SbtOsgi
import com.typesafe.sbt.osgi.SbtOsgi.autoImport._
import sbtrelease.ReleasePlugin
import com.typesafe.sbt.pgp.PgpKeys.publishSigned
val commonSettings = Seq(
scalaVersion := Version.scala212,
crossScalaVersions := Seq(Version.scala213, Version.scala212, Version.scala211, Version.scala210),
javacOptions ++= Seq("-source", "1.8", "-target", "1.8")
)
val dontPublishSettings = Seq(
publishSigned := (),
publish := ()
)
lazy val sslConfigCore = project.in(file("ssl-config-core"))
.settings(commonSettings: _*)
.settings(AutomaticModuleName.settings("ssl.config.core"))
.settings(osgiSettings: _*)
.settings(
name := "ssl-config-core",
libraryDependencies ++= Dependencies.sslConfigCore,
libraryDependencies ++= (
scalaBinaryVersion.value match {
case "2.10" => Seq.empty[ModuleID]
case _ => Seq(Library.parserCombinators)
}),
libraryDependencies ++= (
scalaBinaryVersion.value match {
case "2.10" => Dependencies.testDependencies210
case _ => Dependencies.testDependencies
}
),
OsgiKeys.bundleSymbolicName := s"${organization.value}.sslconfig",
OsgiKeys.exportPackage := Seq(s"com.typesafe.sslconfig.*;version=${version.value}"),
OsgiKeys.importPackage := Seq("!sun.misc", "!sun.security.*", configImport(), "*")
).enablePlugins(ReleasePlugin, SbtOsgi)
lazy val documentation = project.in(file("documentation"))
.settings(dontPublishSettings: _*)
lazy val root = project.in(file("."))
.aggregate(
sslConfigCore,
documentation
)
.settings(dontPublishSettings: _*)
.enablePlugins(CrossPerProjectPlugin)
// JDK6: 1.2.0, Akka 2.4: 1.3.0
def configImport(packageName: String = "com.typesafe.config.*") = versionedImport(packageName, "1.2.0", "1.4.0")
def versionedImport(packageName: String, lower: String, upper: String) = s"""$packageName;version="[$lower,$upper)""""