Skip to content

Commit 433be16

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 433be16

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

build.sbt

Lines changed: 12 additions & 2 deletions
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,15 @@ lazy val interfaces = project
4343
IO.write(props, "Scalafix version constants", out)
4444
List(out)
4545
},
46+
moduleName := "scalafix-properties",
47+
crossPaths := false,
48+
autoScalaLibrary := false
49+
)
50+
.disablePlugins(ScalafixPlugin)
51+
52+
lazy val interfaces = project
53+
.in(file("scalafix-interfaces"))
54+
.settings(
4655
(Compile / javacOptions) ++= List(
4756
"-Xlint:all",
4857
"-Werror"
@@ -56,6 +65,7 @@ lazy val interfaces = project
5665
autoScalaLibrary := false
5766
)
5867
.disablePlugins(ScalafixPlugin)
68+
.dependsOn(properties)
5969

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

0 commit comments

Comments
 (0)