Skip to content

Commit

Permalink
Merge pull request #624 from scalacenter/scala-3
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand authored May 5, 2021
2 parents c06bc73 + 530474f commit 1e4d7b4
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ object MimaPlugin extends AutoPlugin {
case previousArtifacts =>
previousArtifacts.iterator.map { m =>
val moduleId = CrossVersion(m, scalaModuleInfo.value) match {
case Some(f) => m.withName(f(m.name))
case Some(f) => m.withName(f(m.name)).withCrossVersion(CrossVersion.disabled)
case None => m
}
moduleId -> SbtMima.getPreviousArtifact(moduleId, depRes, taskStreams)
Expand Down
15 changes: 15 additions & 0 deletions sbtplugin/src/sbt-test/sbt-mima-plugin/scala-3/build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ThisBuild / organization := "com.example"
ThisBuild / scalaVersion := "3.0.0-RC3"

val `v1-0-0` =
project.settings(
name := "scala-3-mima",
version := "1.0.0-SNAPSHOT"
)

val `v1-0-1` =
project.settings(
name := "scala-3-mima",
version := "1.0.1-SNAPSHOT",
mimaPreviousArtifacts := Set(organization.value %% name.value % "1.0.0-SNAPSHOT")
)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % System.getProperty("plugin.version"))
3 changes: 3 additions & 0 deletions sbtplugin/src/sbt-test/sbt-mima-plugin/scala-3/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> v1-0-0/publishLocal
> reload
> v1-0-1/mimaPreviousClassfiles
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package example

trait Example:
def foo(x: Int): Unit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package example

// Same as v1.0.0
trait Example:
def foo(x: Int): Unit

0 comments on commit 1e4d7b4

Please sign in to comment.