diff --git a/.travis.yml b/.travis.yml index c323d27..9ae00cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: scala scala: - - 2.13.0 - - 2.12.8 + - 2.13.6 + - 2.12.14 jdk: - openjdk8 script: diff --git a/README.md b/README.md index 714efb3..93aae45 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.8, Metrics Version: 4.1.17, Scala Versions: 2.13.6 ## 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..d26997b 100644 --- a/build.sbt +++ b/build.sbt @@ -2,15 +2,15 @@ organization:= "com.kenshoo" name := "metrics-play" -scalaVersion := "2.13.0" +scalaVersion := "2.13.6" -crossScalaVersions := Seq(scalaVersion.value, "2.12.8") +crossScalaVersions := Seq(scalaVersion.value, "2.12.14") -val playVersion = "2.7.3" +val playVersion = "2.8.8" -val metricsPlayVersion = "0.8.2" +val metricsPlayVersion = "0.8.0" -val dropwizardVersion = "4.0.5" +val dropwizardVersion = "4.2.3" version := s"${playVersion}_${metricsPlayVersion}" @@ -21,12 +21,7 @@ testOptions in Test += Tests.Argument("junitxml", "console") parallelExecution in Test := false -resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/" - -resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases" - -resolvers += "specs2" at "https://mvnrepository.com/artifact/org.specs2/specs2_2.12" - +resolvers += Resolver.jcenterRepo libraryDependencies ++= Seq( "io.dropwizard.metrics" % "metrics-core" % dropwizardVersion, diff --git a/project/build.properties b/project/build.properties index c0bab04..10fd9ee 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.2.8 +sbt.version=1.5.5 diff --git a/project/plugins.sbt b/project/plugins.sbt index 0839485..f4ffdc0 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ -resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/" +resolvers += Resolver.jcenterRepo -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.2") 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() ) } }