Skip to content

Commit

Permalink
Make scalafix full cross-version.
Browse files Browse the repository at this point in the history
Scalafix depends on scala-compiler/reflect both for runtime compilation of
rewrites and scalahost's online mirror. Different versions of
scala-compiler and scala-reflect should not be mixed on the same
classpath, even for patch versions. However, we'll try to only publish
scalafix for the latest patch version to simplify the release step.
I'm happy to reconsider publishing scalafix for multiple patch version,
if there is demand for it
  • Loading branch information
olafurpg committed Apr 3, 2017
1 parent a4c2a3d commit 06b5605
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
23 changes: 7 additions & 16 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@ lazy val crossVersions = Seq(
"2.12.1"
)

lazy val buildSettings = Seq(
)

lazy val jvmOptions = Seq(
"-Xss4m"
)

lazy val compilerOptions = Seq(
"-deprecation",
"-encoding",
Expand Down Expand Up @@ -161,6 +154,7 @@ lazy val core = project
allSettings,
buildInfoSettings,
metaconfigSettings,
isFullCrossVersion,
moduleName := "scalafix-core",
dependencyOverrides += scalameta,
libraryDependencies ++= Seq(
Expand All @@ -178,6 +172,7 @@ lazy val core = project
lazy val `scalafix-nsc` = project
.settings(
allSettings,
isFullCrossVersion,
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-compiler" % scalaVersion.value,
scalahostNsc,
Expand Down Expand Up @@ -228,17 +223,9 @@ lazy val `scalafix-nsc` = project
lazy val cli = project
.settings(
allSettings,
packSettings,
isFullCrossVersion,
moduleName := "scalafix-cli",
packJvmOpts := Map(
"scalafix" -> jvmOptions,
"scalafix_ng_server" -> jvmOptions
),
mainClass in assembly := Some("scalafix.cli.Cli"),
packMain := Map(
"scalafix" -> "scalafix.cli.Cli",
"scalafix_ng_server" -> "com.martiansoftware.nailgun.NGServer"
),
libraryDependencies ++= Seq(
"com.github.scopt" %% "scopt" % "3.5.0",
"com.github.alexarchambault" %% "case-app" % "1.1.3",
Expand Down Expand Up @@ -340,3 +327,7 @@ def exposePaths(projectName: String,
}
)
}

lazy val isFullCrossVersion = Seq(
crossVersion := CrossVersion.full
)
1 change: 0 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.3")
addSbtPlugin("com.lihaoyi" % "scalatex-sbt-plugin" % "0.3.7")
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-M15")
addSbtPlugin("org.wartremover" % "sbt-wartremover" % "1.2.1")
addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "0.8.0")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")

Expand Down

0 comments on commit 06b5605

Please sign in to comment.