Skip to content

Commit 9b9c103

Browse files
committed
spin off properties to a separate artifact
sbt-scalafix will exclude that new artifact by blocking transitive dependency of interfaces, forcing users to explicitly pick a version for runtime.
1 parent 97f3740 commit 9b9c103

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

build.sbt

+13-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ def inferJavaHome() = {
2222
Some(actualHome)
2323
}
2424

25-
lazy val interfaces = project
26-
.in(file("scalafix-interfaces"))
25+
lazy val properties = project
26+
.in(file("scalafix-properties"))
2727
.settings(
2828
Compile / resourceGenerators += Def.task {
2929
val props = new java.util.Properties()
@@ -43,6 +43,16 @@ lazy val interfaces = project
4343
IO.write(props, "Scalafix version constants", out)
4444
List(out)
4545
},
46+
moduleName := "scalafix-properties",
47+
mimaPreviousArtifacts := Set.empty,
48+
crossPaths := false,
49+
autoScalaLibrary := false
50+
)
51+
.disablePlugins(ScalafixPlugin)
52+
53+
lazy val interfaces = project
54+
.in(file("scalafix-interfaces"))
55+
.settings(
4656
(Compile / javacOptions) ++= List(
4757
"-Xlint:all",
4858
"-Werror"
@@ -56,6 +66,7 @@ lazy val interfaces = project
5666
autoScalaLibrary := false
5767
)
5868
.disablePlugins(ScalafixPlugin)
69+
.dependsOn(properties)
5970

6071
// Scala 3 macros vendored separately (i.e. without runtime classes), to
6172
// shadow Scala 2.13 macros in the Scala 3 compiler classpath, while producing

0 commit comments

Comments
 (0)