Skip to content

Commit

Permalink
Merge pull request #5 from evolution-gaming/feature/drop-212
Browse files Browse the repository at this point in the history
Drop 2.12 support, prepare for 1.1.0 changes
  • Loading branch information
migesok authored Aug 30, 2024
2 parents e0fa64d + ab28264 commit b86b650
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 27 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CI

on: [push, pull_request]
on: [ push, pull_request ]

jobs:
test:
Expand All @@ -11,7 +11,6 @@ jobs:
matrix:
scala:
- 2.13.14
- 2.12.19
- 3.3.3

steps:
Expand All @@ -25,7 +24,7 @@ jobs:
java-version: openjdk@1.11

- name: build ${{ matrix.scala }}
run: sbt ++${{ matrix.scala }} clean coverage test
run: sbt ++${{ matrix.scala }} clean check coverage test

- name: test coverage
if: success()
Expand Down
9 changes: 6 additions & 3 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
version = 2.2.1
version = "3.8.3"

runner.dialect = scala213source3

align = most
continuationIndent.callSite = 2
continuationIndent.defnSite = 2
danglingParentheses = true
indentOperator = spray
maxColumn = 150
newlines.alwaysBeforeTopLevelStatements = true
align.preset = "most"
danglingParentheses.preset = true
project.excludeFilters = [".*\\.sbt"]
rewrite.rules = [RedundantParens, SortImports]
spaces.inImportCurlyBraces = false
unindentTopLevelOperators = true
indentOperator.exemptScope = all
28 changes: 21 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,35 @@ name := "prometheus-tools"

organization := "com.evolutiongaming"

homepage := Some(new URL("http://github.com/evolution-gaming/prometheus-tools"))
homepage := Some(url("https://github.com/evolution-gaming/prometheus-tools"))

startYear := Some(2018)

organizationName := "Evolution"

organizationHomepage := Some(url("http://evolution.com"))
organizationHomepage := Some(url("https://evolution.com"))

crossScalaVersions := Seq("2.13.14", "2.12.19", "3.3.3")
crossScalaVersions := Seq("2.13.14", "3.3.3")

scalaVersion := crossScalaVersions.value.head

Compile / scalacOptions ++= Seq("-language:implicitConversions")
Compile / scalacOptions ++= {
if (scalaBinaryVersion.value == "2.13") {
Seq(
"-Xsource:3"
)
} else Seq.empty
}

Compile / doc / scalacOptions ++= Seq("-groups", "-implicits", "-no-link-warnings")

publishTo := Some(Resolver.evolutionReleases)

libraryDependencies ++= Seq(
"com.evolutiongaming" %% "executor-tools" % "1.0.4",
"io.prometheus" % "simpleclient_common" % "0.8.1",
"org.scalameta" %% "munit" % "0.7.29" % Test
"com.evolutiongaming" %% "executor-tools" % "1.0.4",
"io.prometheus" % "simpleclient_common" % "0.8.1",
"org.scalameta" %% "munit" % "1.0.0" % Test
)

testFrameworks += new TestFramework("munit.Framework")
Expand All @@ -34,4 +41,11 @@ releaseCrossBuild := true

ThisBuild / versionScheme := Some("semver-spec")

addCommandAlias("check", "all scalafmtCheckAll scalafmtSbtCheck")
// Your next release will be binary compatible with the previous one,
// but it may not be source compatible (ie, it will be a minor release).
ThisBuild / versionPolicyIntention := Compatibility.BinaryCompatible

//used by evolution-gaming/scala-github-actions
addCommandAlias("check", "all versionPolicyCheck Compile/doc scalafmtCheckAll scalafmtSbtCheck")

addCommandAlias("fmtAll", "all scalafmtAll scalafmtSbt")
18 changes: 7 additions & 11 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
addSbtPlugin("com.evolution" % "sbt-artifactory-plugin" % "0.0.2")

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.12")

addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11")

addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0")

addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3")

addSbtPlugin("com.evolution" % "sbt-scalac-opts-plugin" % "0.0.9")
addSbtPlugin("com.evolution" % "sbt-artifactory-plugin" % "0.0.2")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.12")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3")
addSbtPlugin("com.evolution" % "sbt-scalac-opts-plugin" % "0.0.9")
addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "3.2.1")
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ object ObserveDuration {
hasObserve.observe(observer, value)
}

override def timeTillNowNanos[T](start: T)(
implicit numeric: Numeric[T]
override def timeTillNowNanos[T](start: T)(implicit
numeric: Numeric[T]
): Unit = {
val value = duration(start, clock.nowNano) / Collector.NANOSECONDS_PER_SECOND
hasObserve.observe(observer, value)
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ThisBuild / version := "1.0.9-SNAPSHOT"
ThisBuild / version := "1.1.0-SNAPSHOT"

0 comments on commit b86b650

Please sign in to comment.