Skip to content

Commit 33c45fc

Browse files
committed
Make scala2-sbt-bridge's dependencies "provided" (align with Scala 3)
1 parent 35a23d6 commit 33c45fc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

build.sbt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,14 +618,15 @@ lazy val scaladoc = configureAsSubproject(project)
618618
)
619619
.dependsOn(compiler)
620620

621+
// dependencies on compiler and compiler-interface are "provided" to align with scala3-sbt-bridge
621622
lazy val sbtBridge = configureAsSubproject(project, srcdir = Some("sbt-bridge"))
622623
.settings(Osgi.settings)
623624
.settings(AutomaticModuleName.settings("scala.sbtbridge"))
624625
//.settings(fatalWarningsSettings)
625626
.settings(
626627
name := "scala2-sbt-bridge",
627628
description := "sbt compiler bridge for Scala 2",
628-
libraryDependencies += compilerInterfaceDep,
629+
libraryDependencies += compilerInterfaceDep % Provided,
629630
generateServiceProviderResources("xsbti.compile.CompilerInterface2" -> "scala.tools.xsbt.CompilerBridge"),
630631
generateServiceProviderResources("xsbti.compile.ConsoleInterface1" -> "scala.tools.xsbt.ConsoleBridge"),
631632
generateServiceProviderResources("xsbti.compile.ScaladocInterface2" -> "scala.tools.xsbt.ScaladocBridge"),
@@ -651,7 +652,7 @@ lazy val sbtBridge = configureAsSubproject(project, srcdir = Some("sbt-bridge"))
651652
|additional information regarding copyright ownership.
652653
|""".stripMargin)),
653654
)
654-
.dependsOn(compiler, replFrontend, scaladoc)
655+
.dependsOn(compiler % Provided, replFrontend, scaladoc)
655656

656657
lazy val scalap = configureAsSubproject(project)
657658
.settings(fatalWarningsSettings)
@@ -819,7 +820,7 @@ lazy val junit = project.in(file("test") / "junit")
819820
"-Ypatmat-exhaust-depth", "40", // despite not caring about patmat exhaustiveness, we still get warnings for this
820821
),
821822
Compile / javacOptions ++= Seq("-Xlint"),
822-
libraryDependencies ++= Seq(junitInterfaceDep, jolDep, diffUtilsDep),
823+
libraryDependencies ++= Seq(junitInterfaceDep, jolDep, diffUtilsDep, compilerInterfaceDep),
823824
testOptions += Tests.Argument(TestFrameworks.JUnit, "-a", "-v", "-s"),
824825
Compile / unmanagedSourceDirectories := Nil,
825826
Test / unmanagedSourceDirectories := List(baseDirectory.value),

0 commit comments

Comments
 (0)