parent
63ccdeec16
commit
b1df13d4d4
221 changed files with 1528 additions and 1580 deletions
|
|
@ -20,8 +20,7 @@ object OSGi {
|
|||
// Each package contained in a project MUST be known to be private or exported, if it's undecided we MUST resolve this
|
||||
OsgiKeys.failOnUndecidedPackage := true,
|
||||
// By default an entry is generated from module group-id, but our modules do not adhere to such package naming
|
||||
OsgiKeys.privatePackage := Seq()
|
||||
)
|
||||
OsgiKeys.privatePackage := Seq())
|
||||
|
||||
val actor = osgiSettings ++ Seq(
|
||||
OsgiKeys.exportPackage := Seq("akka*"),
|
||||
|
|
@ -29,21 +28,20 @@ object OSGi {
|
|||
//akka-actor packages are not imported, as contained in the CP
|
||||
OsgiKeys.importPackage := (osgiOptionalImports map optionalResolution) ++ Seq("!sun.misc", scalaJava8CompatImport(), scalaVersion(scalaImport).value, configImport(), "*"),
|
||||
// dynamicImportPackage needed for loading classes defined in configuration
|
||||
OsgiKeys.dynamicImportPackage := Seq("*")
|
||||
)
|
||||
OsgiKeys.dynamicImportPackage := Seq("*"))
|
||||
|
||||
val agent = exports(Seq("akka.agent.*"))
|
||||
|
||||
val camel = exports(Seq("akka.camel.*"))
|
||||
|
||||
val cluster = exports(Seq("akka.cluster.*"))
|
||||
|
||||
|
||||
val clusterTools = exports(Seq("akka.cluster.singleton.*", "akka.cluster.client.*", "akka.cluster.pubsub.*"))
|
||||
|
||||
val clusterSharding = exports(Seq("akka.cluster.sharding.*"))
|
||||
|
||||
val clusterSharding = exports(Seq("akka.cluster.sharding.*"))
|
||||
|
||||
val clusterMetrics = exports(Seq("akka.cluster.metrics.*"), imports = Seq(kamonImport(), sigarImport()))
|
||||
|
||||
|
||||
val distributedData = exports(Seq("akka.cluster.ddata.*"))
|
||||
|
||||
val contrib = exports(Seq("akka.contrib.*"))
|
||||
|
|
@ -54,27 +52,27 @@ object OSGi {
|
|||
|
||||
val remote = exports(Seq("akka.remote.*"))
|
||||
|
||||
val parsing = exports(Seq("akka.parboiled2.*", "akka.shapeless.*"),
|
||||
val parsing = exports(
|
||||
Seq("akka.parboiled2.*", "akka.shapeless.*"),
|
||||
imports = Seq(optionalResolution("scala.quasiquotes")))
|
||||
|
||||
val httpCore = exports(Seq("akka.http.*"), imports = Seq(scalaJava8CompatImport()))
|
||||
|
||||
val http = exports(Seq("akka.http.impl.server") ++
|
||||
Seq(
|
||||
"akka.http.$DSL$.server.*",
|
||||
"akka.http.$DSL$.client.*",
|
||||
"akka.http.$DSL$.coding.*",
|
||||
"akka.http.$DSL$.common.*",
|
||||
"akka.http.$DSL$.marshalling.*",
|
||||
"akka.http.$DSL$.unmarshalling.*"
|
||||
) flatMap { p =>
|
||||
Seq(p.replace("$DSL$", "scaladsl"), p.replace("$DSL$", "javadsl"))
|
||||
},
|
||||
val http = exports(
|
||||
Seq("akka.http.impl.server") ++
|
||||
Seq(
|
||||
"akka.http.$DSL$.server.*",
|
||||
"akka.http.$DSL$.client.*",
|
||||
"akka.http.$DSL$.coding.*",
|
||||
"akka.http.$DSL$.common.*",
|
||||
"akka.http.$DSL$.marshalling.*",
|
||||
"akka.http.$DSL$.unmarshalling.*") flatMap { p ⇒
|
||||
Seq(p.replace("$DSL$", "scaladsl"), p.replace("$DSL$", "javadsl"))
|
||||
},
|
||||
imports = Seq(
|
||||
scalaJava8CompatImport(),
|
||||
akkaImport("akka.stream.*"),
|
||||
akkaImport("akka.parboiled2.*"))
|
||||
)
|
||||
akkaImport("akka.parboiled2.*")))
|
||||
|
||||
val httpTestkit = exports(Seq("akka.http.scaladsl.testkit.*", "akka.http.javadsl.testkit.*"))
|
||||
|
||||
|
|
@ -86,8 +84,9 @@ object OSGi {
|
|||
|
||||
val stream =
|
||||
exports(
|
||||
packages = Seq("akka.stream.*",
|
||||
"com.typesafe.sslconfig.akka.*"),
|
||||
packages = Seq(
|
||||
"akka.stream.*",
|
||||
"com.typesafe.sslconfig.akka.*"),
|
||||
imports = Seq(scalaJava8CompatImport(), scalaParsingCombinatorImport())) ++
|
||||
Seq(OsgiKeys.requireBundle := Seq(s"""com.typesafe.sslconfig;bundle-version="${Dependencies.sslConfigVersion}""""))
|
||||
|
||||
|
|
@ -95,7 +94,8 @@ object OSGi {
|
|||
|
||||
val slf4j = exports(Seq("akka.event.slf4j.*"))
|
||||
|
||||
val persistence = exports(Seq("akka.persistence.*"),
|
||||
val persistence = exports(
|
||||
Seq("akka.persistence.*"),
|
||||
imports = Seq(optionalResolution("org.fusesource.leveldbjni.*"), optionalResolution("org.iq80.leveldb.*")))
|
||||
|
||||
val persistenceQuery = exports(Seq("akka.persistence.query.*"))
|
||||
|
|
@ -110,8 +110,7 @@ object OSGi {
|
|||
|
||||
def exports(packages: Seq[String] = Seq(), imports: Seq[String] = Nil) = osgiSettings ++ Seq(
|
||||
OsgiKeys.importPackage := imports ++ scalaVersion(defaultImports).value,
|
||||
OsgiKeys.exportPackage := packages
|
||||
)
|
||||
OsgiKeys.exportPackage := packages)
|
||||
def defaultImports(scalaVersion: String) = Seq("!sun.misc", akkaImport(), configImport(), "!scala.compat.java8.*",
|
||||
"!scala.util.parsing.*", scalaImport(scalaVersion), "*")
|
||||
def akkaImport(packageName: String = "akka.*") = versionedImport(packageName, "2.5", "2.6")
|
||||
|
|
@ -120,7 +119,7 @@ object OSGi {
|
|||
val packageName = "scala.*"
|
||||
val ScalaVersion = """(\d+)\.(\d+)\..*""".r
|
||||
val ScalaVersion(epoch, major) = version
|
||||
versionedImport(packageName, s"$epoch.$major", s"$epoch.${major.toInt+1}")
|
||||
versionedImport(packageName, s"$epoch.$major", s"$epoch.${major.toInt + 1}")
|
||||
}
|
||||
def scalaJava8CompatImport(packageName: String = "scala.compat.java8.*") = versionedImport(packageName, "0.7.0", "1.0.0")
|
||||
def scalaParsingCombinatorImport(packageName: String = "scala.util.parsing.combinator.*") = versionedImport(packageName, "1.0.4", "1.1.0")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue