Skip to content

Commit

Permalink
Merge pull request #128 from bjaglin/local213
Browse files Browse the repository at this point in the history
test/document usage of local 2.13 rules
  • Loading branch information
github-brice-jaglin authored Jun 16, 2020
2 parents 3c78185 + d9ce0a2 commit de8145f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/sbt-test/sbt-scalafix/local-rules/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@ inThisBuild(
// error: Static methods in interface require -target:jvm-1.8
scalafixResolvers := List(
coursierapi.MavenRepository.of("https://repo1.maven.org/maven2")
)
),
scalaVersion := "2.13.0", // out of sync with scalafix.sbt.BuildInfo.scala213 on purpose
scalafixScalaBinaryVersion :=
// this should be the default in sbt-scalafix 1.0
CrossVersion.binaryScalaVersion(scalaVersion.value)
)
)

val rules = project
.disablePlugins(ScalafixPlugin)
.settings(
scalaVersion := Versions.scala212,
crossPaths := false,
libraryDependencies += "ch.epfl.scala" %% "scalafix-core" % Versions.scalafixVersion,
libraryDependencies += "joda-time" % "joda-time" % "2.10.6"
)

val service = project
.dependsOn(rules % ScalafixConfig)
.settings(
scalaVersion := Versions.scala213,
libraryDependencies += "com.nequissimus" % "sort-imports_2.12" % "0.5.0" % ScalafixConfig
libraryDependencies += "com.nequissimus" %% "sort-imports" % "0.5.2" % ScalafixConfig
)

val sameproject = project
.settings(
scalaVersion := Versions.scala212, // the project scala version MUST match the one used by Scalafix
libraryDependencies += "ch.epfl.scala" %% "scalafix-core" % Versions.scalafixVersion % ScalafixConfig
)

0 comments on commit de8145f

Please sign in to comment.