Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to play 2.8.6 and scala 2.13.4 #84

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.6
- 2.12.14
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.8, Metrics Version: 4.1.17, Scala Versions: 2.13.6

## 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
17 changes: 6 additions & 11 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.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}"

Expand All @@ -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,
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.5.5
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 += 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")
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