|
1 | 1 | import _root_.scalafix.sbt.BuildInfo.{scalafixVersion, scala212 => scalafixScala212}
|
2 |
| -import com.lightbend.tools.scalamoduleplugin.ScalaModulePlugin._ |
3 |
| - |
4 |
| -import scala.sys.process._ |
5 | 2 |
|
6 | 3 | lazy val commonSettings = Seq(
|
7 |
| - scalaModuleAutomaticModuleName := Some("scala.collection.compat"), |
8 | 4 | headerLicense := Some(HeaderLicense.Custom(s"""|Scala (https://www.scala-lang.org)
|
9 | 5 | |
|
10 | 6 | |Copyright EPFL and Lightbend, Inc.
|
@@ -60,11 +56,12 @@ lazy val scala30 = "3.0.2"
|
60 | 56 |
|
61 | 57 | lazy val compat = MultiScalaCrossProject(JSPlatform, JVMPlatform, NativePlatform)(
|
62 | 58 | "compat",
|
63 |
| - _.settings(scalaModuleSettings) |
| 59 | + _.settings(ScalaModulePlugin.scalaModuleSettings) |
64 | 60 | .settings(commonSettings)
|
65 | 61 | .settings(
|
66 | 62 | name := "scala-collection-compat",
|
67 | 63 | moduleName := "scala-collection-compat",
|
| 64 | + scalaModuleAutomaticModuleName := Some("scala.collection.compat"), |
68 | 65 | scalacOptions ++= Seq("-feature", "-language:higherKinds", "-language:implicitConversions"),
|
69 | 66 | Compile / unmanagedSourceDirectories += {
|
70 | 67 | val sharedSourceDir = (ThisBuild / baseDirectory).value / "compat/src/main"
|
@@ -170,9 +167,10 @@ lazy val `binary-compat` = project
|
170 | 167 |
|
171 | 168 | lazy val `scalafix-rules` = project
|
172 | 169 | .in(file("scalafix/rules"))
|
173 |
| - .settings(scalaModuleSettings) |
| 170 | + .settings(ScalaModulePlugin.scalaModuleSettings) |
174 | 171 | .settings(commonSettings)
|
175 | 172 | .settings(
|
| 173 | + scalaModuleAutomaticModuleName := None, |
176 | 174 | organization := (compat212JVM / organization).value,
|
177 | 175 | publishTo := (compat212JVM / publishTo).value,
|
178 | 176 | versionPolicyIntention := Compatibility.None,
|
@@ -303,7 +301,8 @@ val isBinaryCompat = sys.env.get("TEST_BINARY_COMPAT").nonEmpty
|
303 | 301 | val jdkVersion = sys.env.get("ADOPTOPENJDK").map(_.toInt)
|
304 | 302 |
|
305 | 303 | // required by sbt-scala-module
|
306 |
| -inThisBuild( |
| 304 | +inThisBuild { |
| 305 | + import scala.sys.process._ |
307 | 306 | Seq(
|
308 | 307 | commands += Command.command("scalafmt-test") { state =>
|
309 | 308 | val exitCode = Seq("admin/scalafmt.sh", "--test") ! state.globalLogging.full
|
@@ -389,4 +388,4 @@ inThisBuild(
|
389 | 388 | state.copy(remainingCommands = newCommands ::: state.remainingCommands)
|
390 | 389 | }
|
391 | 390 | )
|
392 |
| -) |
| 391 | +} |
0 commit comments