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

[2.8.x]: Simplify mima configuration #9926

Merged
merged 1 commit into from
Dec 19, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,11 @@ lazy val PlayAkkaHttp2SupportProject =

lazy val PlayClusterSharding = PlayCrossBuiltProject("Play-Cluster-Sharding", "cluster/play-cluster-sharding")
.settings(libraryDependencies ++= clusterDependencies)
.settings(mimaPreviousArtifacts := Set.empty)
.dependsOn(PlayProject)

lazy val PlayJavaClusterSharding =
PlayCrossBuiltProject("Play-Java-Cluster-Sharding", "cluster/play-java-cluster-sharding")
.settings(libraryDependencies ++= clusterDependencies)
.settings(mimaPreviousArtifacts := Set.empty)
.dependsOn(PlayProject)

lazy val PlayJdbcApiProject = PlayCrossBuiltProject("Play-JDBC-Api", "persistence/play-jdbc-api")
Expand Down
21 changes: 7 additions & 14 deletions project/BuildSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ object BuildSettings {

private val VersionPattern = """^(\d+).(\d+).(\d+)(-.*)?""".r

def mimaPreviousVersions(version: String): Set[String] = Set("2.8.0")

def evictionSettings: Seq[Setting[_]] = Seq(
// This avoids a lot of dependency resolution warnings to be showed.
evictionWarningOptions in update := EvictionWarningOptions.default
Expand Down Expand Up @@ -190,24 +188,19 @@ object BuildSettings {
}
)

// Versions of previous minor releases being checked for binary compatibility
val mimaPreviousVersion: Option[String] = Some("2.8.0")

/**
* These settings are used by all projects that are part of the runtime, as opposed to the development mode of Play.
*/
def playRuntimeSettings: Seq[Setting[_]] = Def.settings(
playCommonSettings,
mimaDefaultSettings,
mimaPreviousArtifacts := {
// Binary compatibility is tested against these versions
val previousVersions = mimaPreviousVersions(version.value)
val cross = if (crossPaths.value) CrossVersion.binary else CrossVersion.disabled
previousVersions.map(v => (organization.value %% moduleName.value % v).cross(cross))
},
mimaPreviousArtifacts := {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, v)) if v >= 13 => Set.empty // No release of Play 2.7 using Scala 2.13, yet
case _ => mimaPreviousArtifacts.value
}
},
mimaPreviousArtifacts := mimaPreviousVersion.map { version =>
val cross = if (crossPaths.value) CrossVersion.binary else CrossVersion.disabled
(organization.value %% moduleName.value % version).cross(cross)
}.toSet,
mimaBinaryIssueFilters ++= Seq(
// Add mima filters here
),
Expand Down