Skip to content

Commit 28832b4

Browse files
committed
minor cleanup in build.sbt
1 parent ac7b1d5 commit 28832b4

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

build.sbt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import _root_.scalafix.sbt.BuildInfo.{scalafixVersion, scala212 => scalafixScala212}
2-
import com.lightbend.tools.scalamoduleplugin.ScalaModulePlugin._
3-
4-
import scala.sys.process._
52

63
lazy val commonSettings = Seq(
7-
scalaModuleAutomaticModuleName := Some("scala.collection.compat"),
84
headerLicense := Some(HeaderLicense.Custom(s"""|Scala (https://www.scala-lang.org)
95
|
106
|Copyright EPFL and Lightbend, Inc.
@@ -60,11 +56,12 @@ lazy val scala30 = "3.0.2"
6056

6157
lazy val compat = MultiScalaCrossProject(JSPlatform, JVMPlatform, NativePlatform)(
6258
"compat",
63-
_.settings(scalaModuleSettings)
59+
_.settings(ScalaModulePlugin.scalaModuleSettings)
6460
.settings(commonSettings)
6561
.settings(
6662
name := "scala-collection-compat",
6763
moduleName := "scala-collection-compat",
64+
scalaModuleAutomaticModuleName := Some("scala.collection.compat"),
6865
scalacOptions ++= Seq("-feature", "-language:higherKinds", "-language:implicitConversions"),
6966
Compile / unmanagedSourceDirectories += {
7067
val sharedSourceDir = (ThisBuild / baseDirectory).value / "compat/src/main"
@@ -170,9 +167,10 @@ lazy val `binary-compat` = project
170167

171168
lazy val `scalafix-rules` = project
172169
.in(file("scalafix/rules"))
173-
.settings(scalaModuleSettings)
170+
.settings(ScalaModulePlugin.scalaModuleSettings)
174171
.settings(commonSettings)
175172
.settings(
173+
scalaModuleAutomaticModuleName := None,
176174
organization := (compat212JVM / organization).value,
177175
publishTo := (compat212JVM / publishTo).value,
178176
versionPolicyIntention := Compatibility.None,
@@ -303,7 +301,8 @@ val isBinaryCompat = sys.env.get("TEST_BINARY_COMPAT").nonEmpty
303301
val jdkVersion = sys.env.get("ADOPTOPENJDK").map(_.toInt)
304302

305303
// required by sbt-scala-module
306-
inThisBuild(
304+
inThisBuild {
305+
import scala.sys.process._
307306
Seq(
308307
commands += Command.command("scalafmt-test") { state =>
309308
val exitCode = Seq("admin/scalafmt.sh", "--test") ! state.globalLogging.full
@@ -389,4 +388,4 @@ inThisBuild(
389388
state.copy(remainingCommands = newCommands ::: state.remainingCommands)
390389
}
391390
)
392-
)
391+
}

0 commit comments

Comments
 (0)