Skip to content

Commit

Permalink
Fix mima checks, make sure to run them
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvanoosten committed Aug 22, 2024
1 parent 0e9f7f2 commit c1c3973
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
21 changes: 8 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ lazy val root = project
publish := {},
publishLocal := {},
name := "metrics4-scala-root",
sonatypeProfileName := "nl.grons"
sonatypeProfileName := "nl.grons",
mimaPreviousArtifacts := Set.empty,
)

lazy val metricsScala = project
Expand All @@ -65,7 +66,7 @@ lazy val metricsScala = project
"io.dropwizard.metrics" % "metrics-core" % "4.2.27",
"io.dropwizard.metrics" % "metrics-healthchecks" % "4.2.27"
),
mimaPreviousArtifacts := mimaPrevious(scalaVersion.value)
mimaPreviousArtifacts := mimaPrevious(name.value, scalaVersion.value)
)

lazy val metricsScalaHdr = project
Expand All @@ -81,7 +82,7 @@ lazy val metricsScalaHdr = project
// Override version that hdrhistogram-metrics-reservoir depends on:
"org.hdrhistogram" % "HdrHistogram" % "2.2.2"
),
mimaPreviousArtifacts := mimaPrevious(scalaVersion.value)
mimaPreviousArtifacts := mimaPrevious(name.value, scalaVersion.value)
)

lazy val metricsPekko = project
Expand Down Expand Up @@ -116,7 +117,7 @@ lazy val metricsAkka26 = project
// scala-steward:on
),
sourceDirectory := baseDirectory.value.getParentFile / "metrics-akka" / "src",
mimaPreviousArtifacts := mimaPrevious(scalaVersion.value)
mimaPreviousArtifacts := mimaPrevious(name.value, scalaVersion.value)
)

lazy val metricsAkka25 = project
Expand All @@ -135,20 +136,14 @@ lazy val metricsAkka25 = project
// scala-steward:on
),
sourceDirectory := baseDirectory.value.getParentFile / "metrics-akka" / "src",
mimaPreviousArtifacts := mimaPrevious(scalaVersion.value)
mimaPreviousArtifacts := mimaPrevious(name.value, scalaVersion.value)
)

// 2.11.x are the only pre-2.12 scala versions that are used in this build
def before212(scalaVersion: String): Boolean = scalaVersion.startsWith("2.11.")

def mimaPrevious(scalaVersion: String): Set[ModuleID] = {
if (scalaVersion.startsWith("3."))
Set("nl.grons" %% "metrics4-scala" % "4.2.8")
else if (scalaVersion.startsWith("2.13."))
Set("nl.grons" %% "metrics4-scala" % "4.0.7")
else
Set("nl.grons" %% "metrics4-scala" % "4.0.1")
}
def mimaPrevious(module: String, scalaVersion: String): Set[ModuleID] =
Set("nl.grons" %% module % "4.2.8")

def scalacTargets(scalaVersion: String): Seq[String] = {
if (scalaVersion.startsWith("2.11.") || scalaVersion.startsWith("2.12.")) Seq("-target:jvm-1.8")
Expand Down
2 changes: 1 addition & 1 deletion crossrelease.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# Does a full cross build of all scala/akka versions.

DEFAULT_COMMAND="+publishSigned; sonatypeBundleRelease"
DEFAULT_COMMAND="; +clean; +test; +package; +mimaFindBinaryIssues; +publishSigned; sonatypeBundleRelease"

# Assumes osx
export JAVA_HOME=`/usr/libexec/java_home -v 11`
Expand Down

0 comments on commit c1c3973

Please sign in to comment.