Merge pull request #139 from dwijnand/mima

Add, configure & enable MiMa
This commit is contained in:
eugene yokota 2017-07-20 15:02:14 -04:00 committed by GitHub
commit b3702ee55d
3 changed files with 10 additions and 3 deletions

View File

@ -7,8 +7,8 @@ scala:
script:
# drop scalafmt on the 1.0.0 branch to dogfood 1.0.0-RC2 before there is a sbt 1.0 of new-sbt-scalafnt
# - sbt -Dfile.encoding=UTF8 -J-XX:ReservedCodeCacheSize=256M ";++$TRAVIS_SCALA_VERSION test;scalafmt::test;test:scalafmt::test"
- sbt -Dfile.encoding=UTF8 -J-XX:ReservedCodeCacheSize=256M ";++$TRAVIS_SCALA_VERSION test"
# - sbt -Dfile.encoding=UTF8 -J-XX:ReservedCodeCacheSize=256M ";++$TRAVIS_SCALA_VERSION;mimaReportBinaryIssues;test;scalafmt::test;test:scalafmt::test"
- sbt -Dfile.encoding=UTF8 -J-XX:ReservedCodeCacheSize=256M ";++$TRAVIS_SCALA_VERSION;mimaReportBinaryIssues;test"
cache:
directories:

View File

@ -30,6 +30,10 @@ def commonSettings: Seq[Setting[_]] = Seq(
parallelExecution in Test := false
)
val mimaSettings = Def settings (
mimaPreviousArtifacts := Set(organization.value %% moduleName.value % "1.0.0-X18")
)
lazy val lmRoot = (project in file("."))
.aggregate(lmCore, lmIvy)
.settings(
@ -91,7 +95,8 @@ lazy val lmCore = (project in file("core"))
val sdirs = (managedSourceDirectories in Compile).value
val base = baseDirectory.value
(((srcs --- sdirs --- base) pair (relativeTo(sdirs) | relativeTo(base) | flat)) toSeq)
}
},
mimaSettings,
)
.configure(addSbtIO, addSbtUtilLogging, addSbtUtilPosition, addSbtUtilCache)
@ -107,6 +112,7 @@ lazy val lmIvy = (project in file("ivy"))
sourceManaged in (Compile, generateContrabands) := baseDirectory.value / "src" / "main" / "contraband-scala",
contrabandFormatsForType in generateContrabands in Compile := DatatypeConfig.getFormats,
scalacOptions in (Compile, console) --= Vector("-Ywarn-unused-import", "-Ywarn-unused", "-Xlint"),
mimaSettings,
)
def customCommands: Seq[Setting[_]] = Seq(

View File

@ -2,5 +2,6 @@ addSbtPlugin("org.scala-sbt" % "sbt-houserules" % "0.3.3")
addSbtPlugin("org.scala-sbt" % "sbt-contraband" % "0.3.0-M9")
// addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.3")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.14")
scalacOptions += "-language:postfixOps"