diff --git a/akka-actor/src/main/scala/akka/japi/pf/CaseStatements.scala b/akka-actor/src/main/scala/akka/japi/pf/CaseStatements.scala index ed040b310f..da89eabb8f 100644 --- a/akka-actor/src/main/scala/akka/japi/pf/CaseStatements.scala +++ b/akka-actor/src/main/scala/akka/japi/pf/CaseStatements.scala @@ -4,7 +4,7 @@ package akka.japi.pf -import FI.{UnitApply, Apply, Predicate} +import FI.{ UnitApply, Apply, Predicate } private[pf] object CaseStatement { def empty[F, T](): PartialFunction[F, T] = PartialFunction.empty diff --git a/akka-zeromq/build.sbt b/akka-zeromq/build.sbt index 287a69c680..4a8b32e32a 100644 --- a/akka-zeromq/build.sbt +++ b/akka-zeromq/build.sbt @@ -11,6 +11,6 @@ Unidoc.javadocSettings OSGi.zeroMQ -libraryDependencies ++= Dependencies.zeroMQ +Dependencies.zeroMQ MimaKeys.previousArtifact := akkaPreviousArtifact("akka-zeromq").value diff --git a/project/AkkaBuild.scala b/project/AkkaBuild.scala index e4438b5b7a..e1d0546139 100644 --- a/project/AkkaBuild.scala +++ b/project/AkkaBuild.scala @@ -32,9 +32,10 @@ object AkkaBuild extends Build { val enableMiMa = false lazy val buildSettings = Seq( - organization := "com.typesafe.akka", - version := "2.4-SNAPSHOT", - scalaVersion := Dependencies.Versions.scalaVersion + organization := "com.typesafe.akka", + version := "2.4-SNAPSHOT", + scalaVersion := Dependencies.Versions.scalaVersion, + crossScalaVersions := Dependencies.Versions.crossScala ) lazy val root = Project( @@ -51,7 +52,7 @@ object AkkaBuild extends Build { S3.progress in S3.upload := true, mappings in S3.upload <<= (Release.releaseDirectory, version) map { (d, v) => val downloads = d / "downloads" - val archivesPathFinder = (downloads * ("*" + v + ".zip")) +++ (downloads * ("*" + v + ".tgz")) + val archivesPathFinder = downloads * s"*$v.zip" archivesPathFinder.get.map(file => (file -> ("akka/" + file.getName))) }, diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 0bcd55d72a..f7b248e219 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -5,12 +5,12 @@ import sbt._ object Dependencies { import DependencyHelpers._ - import DependencyHelpers.ScalaVersionDependentModuleID.post210Dependency + import DependencyHelpers.ScalaVersionDependentModuleID._ object Versions { - val scalaVersion = sys.props.get("akka.scalaVersion").getOrElse("2.10.4") + val crossScala = Seq("2.10.4", "2.11.4") + val scalaVersion = crossScala.head val scalaStmVersion = sys.props.get("akka.build.scalaStmVersion").getOrElse("0.7") - val scalaZeroMQVersion = sys.props.get("akka.build.scalaZeroMQVersion").getOrElse("0.0.7") val scalaTestVersion = sys.props.get("akka.build.scalaTestVersion").getOrElse("2.1.3") val scalaCheckVersion = sys.props.get("akka.build.scalaCheckVersion").getOrElse("1.11.3") } @@ -28,7 +28,7 @@ object Dependencies { val scalaStm = "org.scala-stm" %% "scala-stm" % scalaStmVersion // Modified BSD (Scala) val slf4jApi = "org.slf4j" % "slf4j-api" % "1.7.5" // MIT - val zeroMQClient = "org.zeromq" %% "zeromq-scala-binding" % scalaZeroMQVersion // ApacheV2 + val zeroMQClient = "org.spark-project.zeromq" %% "zeromq-scala-binding" % "0.0.7-spark" // ApacheV2 val uncommonsMath = "org.uncommons.maths" % "uncommons-maths" % "1.2.2a" exclude("jfree", "jcommon") exclude("jfree", "jfreechart") // ApacheV2 val osgiCore = "org.osgi" % "org.osgi.core" % "4.3.1" // ApacheV2 val osgiCompendium= "org.osgi" % "org.osgi.compendium" % "4.3.1" // ApacheV2 @@ -91,7 +91,7 @@ object Dependencies { val docs = Seq(Test.scalatest, Test.junit, Test.junitIntf) - val zeroMQ = Seq(protobuf, zeroMQClient, Test.scalatest, Test.junit) + val zeroMQ = deps(protobuf, zeroMQClient, Test.scalatest, Test.junit) val contrib = Seq(Test.junitIntf, Test.commonsIo) } diff --git a/project/OSGi.scala b/project/OSGi.scala index bf8031b1f5..8b27646a3e 100644 --- a/project/OSGi.scala +++ b/project/OSGi.scala @@ -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)"""" } diff --git a/project/Release.scala b/project/Release.scala index bff9bb90a7..5787592907 100644 --- a/project/Release.scala +++ b/project/Release.scala @@ -22,13 +22,14 @@ object Release { def buildReleaseCommand = Command.command("build-release") { state => val extracted = Project.extract(state) val release = extracted.get(releaseDirectory) + val dist = extracted.get(Dist.distDirectory) val releaseVersion = extracted.get(version) val projectRef = extracted.get(thisProjectRef) val repo = extracted.get(Publish.defaultPublishTo) val state1 = extracted.runAggregated(publishSigned in projectRef, state) val (state2, Seq(api, japi)) = extracted.runTask(unidoc in Compile, state1) val (state3, docs) = extracted.runTask(generate in Sphinx, state2) - val (state4, dist) = extracted.runTask(Dist.dist, state3) + val (state4, _) = extracted.runTask(Dist.dist, state3) val (state5, activatorDist) = extracted.runTask(ActivatorDist.activatorDist in LocalProject(AkkaBuild.samples.id), state4) IO.delete(release) @@ -37,9 +38,15 @@ object Release { IO.copyDirectory(api, release / "api" / "akka" / releaseVersion) IO.copyDirectory(japi, release / "japi" / "akka" / releaseVersion) IO.copyDirectory(docs, release / "docs" / "akka" / releaseVersion) - IO.copyFile(dist, release / "downloads" / dist.name) + + // copy all distributions from dist dir to downloads dir + // may contain distributions from cross-builds + for (f <- (dist * "akka_*.zip").get) + IO.copyFile(f, release / "downloads" / f.name) + for (f <- (activatorDist * "*.zip").get) IO.copyFile(f, release / "downloads" / f.name) + state5 } diff --git a/project/scripts/release b/project/scripts/release index 62305916cd..b9f1dab11a 100755 --- a/project/scripts/release +++ b/project/scripts/release @@ -75,9 +75,9 @@ # # Run the script in two stages. # First a dry run: -# shell> project/scripts/release --dry-run -# And if all goes well a real run: # shell> project/scripts/release +# And if all goes well a real run: +# shell> project/scripts/release --real-run # # The artifacts published to oss.sonatype.org needs to be released by following the # instructions under release here @@ -91,11 +91,13 @@ declare -r default_path="www" declare -r release_dir="target/release" declare release_server=${default_server} declare release_path=${default_path} -declare -r unzipped_dir="target/dist/unzipped" # flags unset run_tests dry_run no_mima no_revert +# dry-run is the default +dry_run=true + # get the source location for this script; handles symlinks function get_script_path { local source="${BASH_SOURCE[0]}" @@ -113,12 +115,13 @@ declare -r script_dir="$(cd -P "$(dirname "${script_path}")" && pwd)" # print usage info function usage { cat <