Skip to content

Commit

Permalink
Require Akka 2.5.10 and use the new version checker utility
Browse files Browse the repository at this point in the history
  • Loading branch information
johanandren committed Feb 23, 2018
1 parent 118b040 commit a591d86
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class HttpExt(private val config: Config)(implicit val system: ActorSystem) exte
with DefaultSSLContextCreation {

akka.http.Version.check(system.settings.config)
akka.AkkaVersion.require("akka-http", akka.http.Version.supportedAkkaVersion)

import Http._

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/paradox/compatibility-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ of your libraries: `Detected java.lang.NoSuchMethodError error, which MAY be cau

### Compatibility with Akka

Akka HTTP 10.1.x is (binary) compatible with Akka `2.5.x`
Akka HTTP 10.1.x is (binary) compatible with Akka `2.5.10+`
and future Akka 2.x versions that are released during the lifetime of Akka HTTP 10.1.x.
To facilitate supporting multiple minor versions of Akka we do not depend on `akka-stream`
explicitly but mark it as a `provided` dependency in our build. That means that you will *always* have to add
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ object Dependencies {
val h2specUrl = s"https://github.com/summerwind/h2spec/releases/download/v${h2specVersion}/${h2specName}.zip"
val alpnAgentVersion = "2.0.7"

val akka25Version = "2.5.9"
val akka25Version = "2.5.10"

lazy val akkaVersion = settingKey[String]("The version of Akka to use.")
lazy val scalaTestVersion = settingKey[String]("The version of ScalaTest to use.")
Expand Down
3 changes: 2 additions & 1 deletion project/VersionGenerator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ object VersionGenerator {
|
|object Version {
| val current: String = "%s"
| val supportedAkkaVersion = "%s"
| def check(config: Config): Unit = {
| val configVersion = config.getString("akka.http.version")
| if (configVersion != current) {
Expand All @@ -37,7 +38,7 @@ object VersionGenerator {

def generateVersion(dir: SettingKey[File], locate: File => File, template: String) = Def.task[Seq[File]] {
val file = locate(dir.value)
val content = template.stripMargin.format(version.value)
val content = template.stripMargin.format(version.value, Dependencies.akkaVersion.value)
if (!file.exists || IO.read(file) != content) IO.write(file, content)
Seq(file)
}
Expand Down

0 comments on commit a591d86

Please sign in to comment.