-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic defaults for mimaPreviousArtifacts
Kind of like sbt-mima-version-check
- Loading branch information
1 parent
cec9539
commit 2e864a6
Showing
2 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
src/main/scala/sbtcompatibility/SbtCompatibilityMima.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package sbtcompatibility | ||
|
||
import com.typesafe.tools.mima.plugin.MimaPlugin | ||
import sbt.{AutoPlugin, Def, Keys} | ||
import sbtcompatibility.version.Version | ||
|
||
object SbtCompatibilityMima extends AutoPlugin { | ||
|
||
override def trigger = allRequirements | ||
override def requires = MimaPlugin | ||
|
||
override def projectSettings = Def.settings( | ||
MimaPlugin.autoImport.mimaPreviousArtifacts := { | ||
val projId = Keys.projectID.value | ||
val versions = Version.latestCompatibleWith(sbt.Keys.version.value).toSet | ||
versions.map(version => projId.withRevision(version)) | ||
} | ||
) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters