-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make MiMa not extend
PublishModule
(#158)
* Make MiMa not extend `PublishModule` Functionality for `PublishModule` is still supported but it is required only at runtime, to allow checking on modules that don't extend `PublishModule` * Simplify MyProblemReporting.isReported
- Loading branch information
Showing
9 changed files
with
77 additions
and
17 deletions.
There are no files selected for viewing
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
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,26 @@ | ||
import mill._ | ||
|
||
import mill.scalalib._ | ||
import mill.scalalib.publish._ | ||
import $file.plugins | ||
import com.github.lolgab.mill.mima._ | ||
|
||
object prev extends ScalaModule with PublishModule { | ||
def scalaVersion = "2.13.4" | ||
def publishVersion = "0.0.1" | ||
def pomSettings = | ||
PomSettings("", organization = "org", "", Seq(), VersionControl(), Seq()) | ||
} | ||
object curr extends ScalaModule with Mima { | ||
def scalaVersion = "2.13.4" | ||
override def mimaPreviousArtifacts = T(Agg(ivy"org::prev:0.0.1")) | ||
} | ||
|
||
def prepare() = T.command { | ||
prev.publishLocal(sys.props("ivy.home") + "/local")() | ||
} | ||
|
||
def verify() = T.command { | ||
curr.mimaReportBinaryIssues()() | ||
() | ||
} |
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 @@ | ||
object Main {} |
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,3 @@ | ||
object Main { | ||
def hello(): String = "Hello world!" | ||
} |
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
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
13 changes: 13 additions & 0 deletions
13
mill-mima-worker-impl/src/com/typesafe/tools/mima/core/MyProblemReporting.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,13 @@ | ||
package com.typesafe.tools.mima.core | ||
|
||
private[com] object MyProblemReporting { | ||
def isReported( | ||
versionOpt: Option[String], | ||
filters: Seq[ProblemFilter], | ||
versionedFilters: Map[String, Seq[ProblemFilter]] | ||
)(problem: Problem): Boolean = versionOpt match { | ||
case None => filters.forall(_(problem)) | ||
case Some(version) => | ||
ProblemReporting.isReported(version, filters, versionedFilters)(problem) | ||
} | ||
} |
5 changes: 0 additions & 5 deletions
5
mill-mima-worker-impl/src/com/typesafe/tools/mima/core/ProblemReportingExport.scala
This file was deleted.
Oops, something went wrong.
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