Skip to content

Commit

Permalink
Merge pull request #15 from alexarchambault/develop
Browse files Browse the repository at this point in the history
Fix scoping issue when getting compatibilityReconciliations
  • Loading branch information
alexarchambault authored Jun 9, 2020
2 parents 54b53e0 + 5931c45 commit 6b37fd1
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Add to your `project/plugins.sbt`:
```scala
addSbtPlugin("io.github.alexarchambault.sbt" % "sbt-compatibility" % "0.0.4")
```
The latest version is [![Maven Central](https://img.shields.io/maven-central/v/io.github.alexarchambault.sbt/sbt-compatibility-dummy.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.alexarchambault.sbt/sbt-compatibility-dummy).
The latest version is [![Maven Central](https://img.shields.io/maven-central/v/io.github.alexarchambault.sbt/sbt-compatibility-dummy_2.12.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.alexarchambault.sbt/sbt-compatibility-dummy_2.12).

sbt-compatibility depends on [sbt-mima](https://github.com/lightbend/mima), so that you don't need to explicitly
depend on it.
Expand Down
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ inThisBuild(List(

lazy val `sbt-compatibility` = project
.in(file("."))
.aggregate(`sbt-compatibility-dummy`)
.enablePlugins(ScriptedPlugin)
.settings(
sbtPlugin := true,
Expand All @@ -31,7 +32,7 @@ lazy val `sbt-compatibility` = project
testFrameworks += new TestFramework("utest.runner.Framework")
)

lazy val `sbt-eviction-warnings-dummy` = project
lazy val `sbt-compatibility-dummy` = project
.in(file("target/dummy"))
.settings(
sonatypeProfileName := "io.github.alexarchambault"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ object SbtCompatibilityPlugin extends AutoPlugin {

override def projectSettings =
SbtCompatibilitySettings.updateSettings ++
SbtCompatibilitySettings.reconciliationSettings ++
SbtCompatibilitySettings.previousArtifactsSettings ++
SbtCompatibilitySettings.findIssuesSettings
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ object SbtCompatibilitySettings {
compatibilityUseCsrConfigReconciliations := true,
compatibilityReconciliations := Seq.empty,
compatibilityIgnored := Seq.empty,
compatibilityDefaultReconciliation := VersionCompatibility.PackVer
)

def reconciliationSettings = Def.settings(
compatibilityDetailedReconciliations := {
val sv = scalaVersion.value
val sbv = scalaBinaryVersion.value
Expand All @@ -51,8 +55,7 @@ object SbtCompatibilitySettings {
val matchers = ModuleMatchers.only(mod.organization, name)
(matchers, rec)
}
},
compatibilityDefaultReconciliation := VersionCompatibility.PackVer
}
)

def previousArtifactsSettings = Def.settings(
Expand Down
22 changes: 22 additions & 0 deletions src/sbt-test/sbt-compatibility/simple/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,28 @@ lazy val e = project
version := "0.1.1"
)

lazy val f = project
.settings(
shared,
name := "simple-test",
libraryDependencies ++= Seq(
"com.chuusai" %% "shapeless" % "2.3.3"
),
compatibilityReconciliations += "com.chuusai" %% "shapeless" % "strict",
version := "0.1.1"
)

lazy val g = project
.settings(
shared,
name := "simple-test",
libraryDependencies ++= Seq(
"com.chuusai" %% "shapeless" % "2.3.3"
),
compatibilityReconciliations += "com.chuusai" %% "shapeless" % "pvp",
version := "0.1.1"
)

inThisBuild(List(
scalaVersion := "2.12.11",
organization := "io.github.alexarchambault.sbtcompatibility.test",
Expand Down
2 changes: 2 additions & 0 deletions src/sbt-test/sbt-compatibility/simple/test
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
> c/check
> d/check
> e/compatibilityReportDependencyIssues
-> f/compatibilityReportDependencyIssues
> g/compatibilityReportDependencyIssues

0 comments on commit 6b37fd1

Please sign in to comment.