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

Set MIMA plugin for the project #560

Merged
merged 2 commits into from
Sep 5, 2021
Merged
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
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ jobs:
- name: Upload Codecov Results
run: codecov -F ${{ matrix.scala }}

- name: Binary compatibility check
run: sbt ++${{ matrix.scala }} mimaReportBinaryIssues

publish:
name: Publish Artifacts
needs: [build]
Expand Down
14 changes: 13 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,20 @@ val irrecVersion = "0.4.0"

val Scala212 = "2.12.14"

val previousVersion = "0.10.1"

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

ThisBuild / crossScalaVersions := Seq(Scala212)
ThisBuild / scalaVersion := (ThisBuild / crossScalaVersions).value.last

ThisBuild / mimaFailOnNoPrevious := false

lazy val root = Project("frameless", file("." + "frameless")).in(file("."))
.aggregate(core, cats, dataset, ml, docs)
.settings(framelessSettings: _*)
.settings(noPublishSettings: _*)
.settings(mimaPreviousArtifacts := Set())

lazy val core = project
.settings(name := "frameless-core")
Expand Down Expand Up @@ -88,6 +93,7 @@ lazy val docs = project
"-Ydelambdafy:inline"
)
)
.settings(mimaPreviousArtifacts := Set())
.dependsOn(dataset, cats, ml)

lazy val framelessSettings = Seq(
Expand Down Expand Up @@ -120,7 +126,8 @@ lazy val framelessSettings = Seq(
"org.scalacheck" %% "scalacheck" % scalacheck % "test"),
Test / javaOptions ++= Seq("-Xmx1G", "-ea"),
Test / fork := true,
Test / parallelExecution := false
Test / parallelExecution := false,
mimaPreviousArtifacts := Set("org.typelevel" %% name.value % previousVersion)
) ++ consoleSettings

lazy val consoleSettings = Seq(
Expand Down Expand Up @@ -229,6 +236,11 @@ ThisBuild / githubWorkflowBuild := Seq(
)
)

ThisBuild / githubWorkflowBuild += WorkflowStep.Sbt(
List("mimaReportBinaryIssues"),
name = Some("Binary compatibility check")
)

ThisBuild / githubWorkflowPublishTargetBranches := Seq(
RefPredicate.Equals(Ref.Branch("master")),
RefPredicate.StartsWith(Ref.Tag("v"))
Expand Down
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.2")
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.13.0")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.23")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.0.0")