=pro #16371 enable cross builds

* changed zeromq-scala-binding library
* modified build-release task to include distributions from cross builds
* removed tar-zip step from release script, because tgz package is not used from the website
* release script now releases for all crossScalaVersions
* dry run is the default now
This commit is contained in:
Martynas Mickevičius 2014-11-30 15:53:41 +02:00
parent 338f61886e
commit 932f8a9bd7
7 changed files with 39 additions and 40 deletions

View file

@ -6,8 +6,6 @@ import sbt.Keys._
object OSGi {
val Seq(scalaEpoch, scalaMajor) = """(\d+)\.(\d+)\..*""".r.unapplySeq(Dependencies.Versions.scalaVersion).get.map(_.toInt)
// The included osgiSettings that creates bundles also publish the jar files
// in the .../bundles directory which makes testing locally published artifacts
// a pain. Create bundles but publish them to the normal .../jars directory.
@ -19,7 +17,7 @@ object OSGi {
OsgiKeys.exportPackage := Seq("akka*"),
OsgiKeys.privatePackage := Seq("akka.osgi.impl"),
//akka-actor packages are not imported, as contained in the CP
OsgiKeys.importPackage := (osgiOptionalImports map optionalResolution) ++ Seq("!sun.misc", scalaImport(), configImport(), "*"),
OsgiKeys.importPackage := (osgiOptionalImports map optionalResolution) ++ Seq("!sun.misc", scalaVersion(scalaImport).value, configImport(), "*"),
// dynamicImportPackage needed for loading classes defined in configuration
OsgiKeys.dynamicImportPackage := Seq("*")
)
@ -50,14 +48,19 @@ object OSGi {
"com.google.protobuf")
def exports(packages: Seq[String] = Seq(), imports: Seq[String] = Nil) = osgiSettings ++ Seq(
OsgiKeys.importPackage := imports ++ defaultImports,
OsgiKeys.importPackage := imports ++ scalaVersion(defaultImports).value,
OsgiKeys.exportPackage := packages
)
def defaultImports = Seq("!sun.misc", akkaImport(), configImport(), scalaImport(), "*")
def defaultImports(scalaVersion: String) = Seq("!sun.misc", akkaImport(), configImport(), scalaImport(scalaVersion), "*")
def akkaImport(packageName: String = "akka.*") = versionedImport(packageName, "2.4", "2.5")
def configImport(packageName: String = "com.typesafe.config.*") = versionedImport(packageName, "1.2.0", "1.3.0")
def protobufImport(packageName: String = "com.google.protobuf.*") = versionedImport(packageName, "2.5.0", "2.6.0")
def scalaImport(packageName: String = "scala.*") = versionedImport(packageName, s"$scalaEpoch.$scalaMajor", s"$scalaEpoch.${scalaMajor+1}")
def scalaImport(version: String) = {
val packageName = "scala.*"
val ScalaVersion = """(\d+)\.(\d+)\..*""".r
val ScalaVersion(epoch, major) = version
versionedImport(packageName, s"$epoch.$major", s"$epoch.${major+1}")
}
def optionalResolution(packageName: String) = "%s;resolution:=optional".format(packageName)
def versionedImport(packageName: String, lower: String, upper: String) = s"""$packageName;version="[$lower,$upper)""""
}