diff options
author | Jakob Odersky <jakob@driver.xyz> | 2018-10-11 12:28:03 -0700 |
---|---|---|
committer | Jakob Odersky <jakob@odersky.com> | 2018-10-12 10:51:59 -0700 |
commit | 03ed05c0fcb948237d66f032c4e530b2349404b9 (patch) | |
tree | be17a8a58fd66cb33fa93c2bc19a9c45f2a52698 /project/MiMaSettings.scala | |
parent | 0a32398637816773406a08d2a201ef3be5836cb2 (diff) | |
download | driver-core-03ed05c0fcb948237d66f032c4e530b2349404b9.tar.gz driver-core-03ed05c0fcb948237d66f032c4e530b2349404b9.tar.bz2 driver-core-03ed05c0fcb948237d66f032c4e530b2349404b9.zip |
Enable the Migration Manager Plugin to check for ABI changes
Diffstat (limited to 'project/MiMaSettings.scala')
-rw-r--r-- | project/MiMaSettings.scala | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/project/MiMaSettings.scala b/project/MiMaSettings.scala new file mode 100644 index 0000000..d3ec3c1 --- /dev/null +++ b/project/MiMaSettings.scala @@ -0,0 +1,28 @@ +import com.typesafe.tools.mima.plugin.MimaPlugin +import sbt.{Def, _} +import sbt.Keys._ + +/** This plugin extends the Migration Manager (MiMa) Plugin with common settings + * for driver-core projects. + */ +object MiMaSettings extends AutoPlugin { + + override def requires = MimaPlugin + override def trigger = allRequirements + + object autoImport { + val abiVersion = settingKey[String]("Previous version of binary-compatible projects") + val checkAbi = taskKey[Unit]("Check ABI compatibility with declared abiVersion") + } + import autoImport._ + import MimaPlugin.autoImport._ + + override def buildSettings: Seq[Def.Setting[_]] = Seq(abiVersion := "") + override def projectSettings: Seq[Def.Setting[_]] = Seq( + mimaPreviousArtifacts := Set( + "xyz.driver" %% name.value % abiVersion.value + ), + checkAbi := mimaReportBinaryIssues.value + ) + +} |