Skip to content
This repository has been archived by the owner on Mar 11, 2020. It is now read-only.

Commit

Permalink
Add sbt-mima-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
rossabaker committed May 6, 2017
1 parent 4daa52e commit 65ecf57
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 4 deletions.
2 changes: 2 additions & 0 deletions docs/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import com.typesafe.sbt.SbtSite.SiteKeys._
import com.typesafe.sbt.SbtGhPages.GhPagesKeys._

enablePlugins(DisablePublishingPlugin)
disablePlugins(BinCompatPlugin)

site.settings

Expand All @@ -16,3 +17,4 @@ ghpagesNoJekyll := false
includeFilter in makeSite := "*.yml" | "*.md" | "*.html" | "*.css" | "*.png" | "*.jpg" | "*.gif" | "*.js" | "*.swf"

git.remoteRepo := "[email protected]:Verizon/knobs.git"

5 changes: 5 additions & 0 deletions project.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@ lazy val zookeeper = project.dependsOn(core)

lazy val docs = project.dependsOn(core, zookeeper)

(binCompatVersion in ThisBuild) := Some(scalazCrossVersioner.value("4.0.30"))

enablePlugins(DisablePublishingPlugin)
binCompatVersion := None

// Some tests set system properties, which results in a
// ConcurrentModificationException while other tests are iterating
// over sys.props. For a stable build, we need to reduce test
// concurrency to 1 across modules.
concurrentRestrictions in Global += Tags.limit(Tags.Test, 1)


36 changes: 36 additions & 0 deletions project/BinCompatPlugin.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//: ----------------------------------------------------------------------------
//: Copyright (C) 2017 Verizon. All Rights Reserved.
//:
//: Licensed under the Apache License, Version 2.0 (the "License");
//: you may not use this file except in compliance with the License.
//: You may obtain a copy of the License at
//:
//: http://www.apache.org/licenses/LICENSE-2.0
//:
//: Unless required by applicable law or agreed to in writing, software
//: distributed under the License is distributed on an "AS IS" BASIS,
//: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//: See the License for the specific language governing permissions and
//: limitations under the License.
//:
//: ----------------------------------------------------------------------------
import sbt._, Keys._
import com.typesafe.tools.mima.plugin.MimaPlugin

object BinCompatPlugin extends AutoPlugin {
object autoImport {
val binCompatVersion = settingKey[Option[String]]("version to check binary compatibility against")
}

import autoImport._
import MimaPlugin.autoImport._

override def requires = MimaPlugin && verizon.build.ScalazPlugin

override def trigger = allRequirements

override lazy val projectSettings = Seq(
mimaPreviousArtifacts := binCompatVersion.value
.fold(Set.empty[ModuleID])(v => Set(organization.value %% name.value % v))
)
}
9 changes: 5 additions & 4 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ resolvers += Resolver.url(
addSbtPlugin("io.verizon.build" % "sbt-rig" % "2.0.29")

// docs
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "0.8.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.3")
addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.4.7")
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.3.2")
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "0.8.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.3")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.14")
addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.4.7")
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.3.2")

scalacOptions += "-deprecation"

0 comments on commit 65ecf57

Please sign in to comment.