Skip to content

Commit

Permalink
upgrade to play 2.8.6 and scala 2.13.4
Browse files Browse the repository at this point in the history
  • Loading branch information
domizei385 committed Feb 13, 2021
1 parent ff666c7 commit d2628a4
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: scala
scala:
- 2.13.0
- 2.12.8
- 2.13.4
- 2.12.13
jdk:
- openjdk8
script:
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"
)
```

Expand Down Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand All @@ -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(
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.8
sbt.version=1.4.7
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -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")
2 changes: 1 addition & 1 deletion src/main/scala/com/kenshoo/play/metrics/Metrics.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
8 changes: 4 additions & 4 deletions src/main/scala/com/kenshoo/play/metrics/PlayModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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()
)
}
}
Expand Down

0 comments on commit d2628a4

Please sign in to comment.