Skip to content

Commit

Permalink
Play 2.7.0 released! Comes with Scala 2.13.0-M5 ;) (#72)
Browse files Browse the repository at this point in the history
* Play 2.7.0 released! Comes with Scala 2.13.0-M5 ;)

* Fix for Scala 2.13

* Fix deprecation warnings for Scala 2.13
  • Loading branch information
mkurz authored and mumoshu committed Mar 7, 2019
1 parent 66d7412 commit e9f09fd
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 25 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
language: scala
scala:
- 2.11.12
- 2.12.7
# - 2.13.0-M4
- 2.12.8
- 2.13.0-M5
services:
- memcache
jdk:
- oraclejdk8
env:
- PLAY_VERSION=2.7.0-RC8
- PLAY_VERSION=2.7.0
# see https://github.com/travis-ci/travis-ci/issues/5227#issuecomment-165131913
before_install:
- cat /etc/hosts
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,12 @@ Configure your configuration endpoint in `application.conf`:
PLAY_VERSION=2.5.0 sbt ++2.11.12 publishSigned sonatypeRelease
# Play 2.6
PLAY_VERSION=2.6.0 sbt ++2.12.6 publishSigned sonatypeRelease
PLAY_VERSION=2.6.0 sbt ++2.12.8 publishSigned sonatypeRelease
# Play 2.7
PLAY_VERSION=2.7.0-M2 sbt ++2.11.12 publishSigned sonatypeRelease
PLAY_VERSION=2.7.0-M2 sbt ++2.12.6 publishSigned sonatypeRelease
PLAY_VERSION=2.7.0 sbt ++2.11.12 publishSigned sonatypeRelease
PLAY_VERSION=2.7.0 sbt ++2.12.8 publishSigned sonatypeRelease
PLAY_VERSION=2.7.0 sbt ++2.13.0-M5 publishSigned sonatypeRelease
```

### Acknowledgement
Expand Down
9 changes: 6 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ val spymemcached = "net.spy" % "spymemcached" % "2.12.3"
val h2databaseTest = "com.h2database" % "h2" % "1.4.196" % Test

lazy val baseSettings = Seq(
scalaVersion := "2.12.7",
crossScalaVersions := Seq("2.11.12", "2.12.7"),
parallelExecution in Test := false
scalaVersion := "2.12.8",
crossScalaVersions := Seq("2.11.12", "2.12.8", "2.13.0-M5"),
parallelExecution in Test := false,
// Workaround until omnidoc gets published for Scala 2.13
// http://central.maven.org/maven2/com/typesafe/play/play-omnidoc_2.13/
PlayKeys.playOmnidoc := false
)

def playShortName: String = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class MemcachedCacheApi @Inject() (val namespace: String, val client: MemcachedC
logger.debug("Getting the cache for key " + namespace + key)
val p = Promise[Option[T]]() // create incomplete promise/future
client.asyncGet(namespace + hash(key), tc).addListener(new GetCompletionListener() {
def onComplete(result: GetFuture[_]) {
def onComplete(result: GetFuture[_]): Unit = {
try {
result.getStatus().getStatusCode() match {
case StatusCode.SUCCESS => {
Expand Down Expand Up @@ -86,9 +86,9 @@ class MemcachedCacheApi @Inject() (val namespace: String, val client: MemcachedC
def set(key: String, value: Any, expiration: Duration = Duration.Inf): Future[Done] = {
if (!key.isEmpty) {
val p = Promise[Done]() // create incomplete promise/future
val exp = if (expiration.isFinite()) expiration.toSeconds.toInt else 0
val exp = if (expiration.isFinite) expiration.toSeconds.toInt else 0
client.set(namespace + hash(key), exp, value, tc).addListener(new OperationCompletionListener() {
def onComplete(result: OperationFuture[_]) {
def onComplete(result: OperationFuture[_]): Unit = {
result.getStatus().getStatusCode() match {
case StatusCode.SUCCESS => {
p.success(Done)
Expand Down Expand Up @@ -116,7 +116,7 @@ class MemcachedCacheApi @Inject() (val namespace: String, val client: MemcachedC
if (!key.isEmpty) {
val p = Promise[Done]() // create incomplete promise/future
client.delete(namespace + hash(key)).addListener(new OperationCompletionListener() {
def onComplete(result: OperationFuture[_]) {
def onComplete(result: OperationFuture[_]): Unit = {
result.getStatus().getStatusCode() match {
case StatusCode.SUCCESS => {
p.success(Done)
Expand Down Expand Up @@ -147,7 +147,7 @@ class MemcachedCacheApi @Inject() (val namespace: String, val client: MemcachedC
def removeAll(): Future[Done] = {
val p = Promise[Done]() // create incomplete promise/future
client.flush().addListener(new OperationCompletionListener() {
def onComplete(result: OperationFuture[_]) {
def onComplete(result: OperationFuture[_]): Unit = {
result.getStatus().getStatusCode() match {
case StatusCode.SUCCESS => {
p.success(Done)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Slf4JLogger(name: String) extends AbstractLogger(name) {

def isInfoEnabled = logger.isInfoEnabled

def log(level: Level, msg: AnyRef, throwable: Throwable) {
def log(level: Level, msg: AnyRef, throwable: Throwable): Unit = {
val message = msg.toString
level match {
case Level.TRACE => logger.trace(message, throwable)
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.2.6
sbt.version=1.2.8
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ivyLoggingLevel := UpdateLogging.Full

val playVersion = scala.util.Properties.envOrElse("PLAY_VERSION", "2.7.0-RC8")
val playVersion = scala.util.Properties.envOrElse("PLAY_VERSION", "2.7.0")

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % playVersion)

Expand Down
7 changes: 3 additions & 4 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash

PLAY_VERSION=2.7.0-RC8 sbt ++2.11.12 publishSigned
PLAY_VERSION=2.7.0-RC8 sbt ++2.12.7 publishSigned
# not working yet, wait for final Play 2.7 and Scala 2.13 release:
#PLAY_VERSION=2.7.0-RC8 sbt ++2.13.0-M4 publishSigned
PLAY_VERSION=2.7.0 sbt ++2.11.12 publishSigned
PLAY_VERSION=2.7.0 sbt ++2.12.8 publishSigned
PLAY_VERSION=2.7.0 sbt ++2.13.0-M5 publishSigned
2 changes: 1 addition & 1 deletion samples/java/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.2.6
sbt.version=1.2.8
2 changes: 1 addition & 1 deletion samples/java/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.0-RC8")
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.0")

2 changes: 1 addition & 1 deletion samples/scala/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.2.6
sbt.version=1.2.8
2 changes: 1 addition & 1 deletion samples/scala/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.0-RC8")
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.0")

0 comments on commit e9f09fd

Please sign in to comment.