From d2628a42a2912e94a22e3adb747af78fd0a0ebbe Mon Sep 17 00:00:00 2001 From: Dominik Zeiger Date: Sat, 13 Feb 2021 21:56:44 +0100 Subject: [PATCH] upgrade to play 2.8.6 and scala 2.13.4 --- .travis.yml | 4 ++-- README.md | 5 +++-- build.sbt | 16 ++++++++-------- project/build.properties | 2 +- project/plugins.sbt | 4 ++-- .../scala/com/kenshoo/play/metrics/Metrics.scala | 2 +- .../com/kenshoo/play/metrics/PlayModule.scala | 8 ++++---- 7 files changed, 21 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index c323d27..158cf93 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: scala scala: - - 2.13.0 - - 2.12.8 + - 2.13.4 + - 2.12.13 jdk: - openjdk8 script: diff --git a/README.md b/README.md index 714efb3..231d6ad 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This module provides some support for @codahale [Metrics](https://dropwizard.git [![codecov.io](https://img.shields.io/codecov/c/gh/kenshoo/metrics-play/master.svg)](https://codecov.io/github/kenshoo/metrics-play/branch/master) -Play Version: 2.7.0, Metrics Version: 4.0.5, Scala Versions: 2.12.8 +Play Version: 2.8.6, Metrics Version: 4.1.17, Scala Versions: 2.13.4 ## Features @@ -22,7 +22,7 @@ Add metrics-play dependency: ```scala val appDependencies = Seq( ... - "com.kenshoo" %% "metrics-play" % "2.7.3_0.8.2" + "com.kenshoo" %% "metrics-play" % "2.8.6_0.8.0" ) ``` @@ -137,6 +137,7 @@ play.modules.enabled+="myapp.MyMetricsModule" ## Changes +* 2.8.6_0.8.0 - Play 2.8, Scala 2.13.4, Dropwizard 4.1.17 * 2.7.3_0.8.2 - Minor compatability fix for Play 2.8 * 2.7.3_0.8.1 - Upgrade to play 2.7.3 and support Scala version 2.12.8 / 2.13.0 with dropwizard 4.0.5 * 2.7.0_0.8.0 - Upgrade to play 2.7.0 and Scala 2.12.8 and dropwizard 4.0.5 diff --git a/build.sbt b/build.sbt index 1160c06..c0feeab 100644 --- a/build.sbt +++ b/build.sbt @@ -2,15 +2,15 @@ organization:= "com.kenshoo" name := "metrics-play" -scalaVersion := "2.13.0" +scalaVersion := "2.13.4" -crossScalaVersions := Seq(scalaVersion.value, "2.12.8") +crossScalaVersions := Seq(scalaVersion.value, "2.12.13") -val playVersion = "2.7.3" +val playVersion = "2.8.6" -val metricsPlayVersion = "0.8.2" +val metricsPlayVersion = "0.8.0" -val dropwizardVersion = "4.0.5" +val dropwizardVersion = "4.1.17" version := s"${playVersion}_${metricsPlayVersion}" @@ -21,11 +21,11 @@ testOptions in Test += Tests.Argument("junitxml", "console") parallelExecution in Test := false -resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/" +resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/" -resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases" +resolvers += "scalaz-bintray" at "https://dl.bintray.com/scalaz/releases" -resolvers += "specs2" at "https://mvnrepository.com/artifact/org.specs2/specs2_2.12" +resolvers += "specs2" at "https://mvnrepository.com/artifact/org.specs2/specs2_2.13" libraryDependencies ++= Seq( diff --git a/project/build.properties b/project/build.properties index c0bab04..0b2e09c 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.2.8 +sbt.version=1.4.7 diff --git a/project/plugins.sbt b/project/plugins.sbt index 0839485..27fe62d 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ -resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/" +resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/" -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1") addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2-1") diff --git a/src/main/scala/com/kenshoo/play/metrics/Metrics.scala b/src/main/scala/com/kenshoo/play/metrics/Metrics.scala index 8a5cecd..33329cd 100644 --- a/src/main/scala/com/kenshoo/play/metrics/Metrics.scala +++ b/src/main/scala/com/kenshoo/play/metrics/Metrics.scala @@ -50,7 +50,7 @@ class MetricsImpl @Inject() (lifecycle: ApplicationLifecycle, configuration: Con def defaultRegistry: MetricRegistry = SharedMetricRegistries.getOrCreate(registryName) - def setupJvmMetrics(registry: MetricRegistry) { + def setupJvmMetrics(registry: MetricRegistry): Unit = { if (jvmMetricsEnabled) { registry.register("jvm.attribute", new JvmAttributeGaugeSet()) registry.register("jvm.gc", new GarbageCollectorMetricSet()) diff --git a/src/main/scala/com/kenshoo/play/metrics/PlayModule.scala b/src/main/scala/com/kenshoo/play/metrics/PlayModule.scala index 447e880..1d8c26b 100644 --- a/src/main/scala/com/kenshoo/play/metrics/PlayModule.scala +++ b/src/main/scala/com/kenshoo/play/metrics/PlayModule.scala @@ -7,13 +7,13 @@ class PlayModule extends Module { override def bindings(environment: Environment, configuration: Configuration): Seq[Binding[_]] = { if (configuration.get[Boolean]("metrics.enabled")) { Seq( - bind[MetricsFilter].to[MetricsFilterImpl].eagerly, - bind[Metrics].to[MetricsImpl].eagerly + bind[MetricsFilter].to[MetricsFilterImpl].eagerly(), + bind[Metrics].to[MetricsImpl].eagerly() ) } else { Seq( - bind[MetricsFilter].to[DisabledMetricsFilter].eagerly, - bind[Metrics].to[DisabledMetrics].eagerly + bind[MetricsFilter].to[DisabledMetricsFilter].eagerly(), + bind[Metrics].to[DisabledMetrics].eagerly() ) } }