Skip to content

Commit

Permalink
Make scala2-sbt-bridge's dependencies "provided" (align with Scala 3)
Browse files Browse the repository at this point in the history
  • Loading branch information
lrytz committed Aug 3, 2023
1 parent 35a23d6 commit 33c45fc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -618,14 +618,15 @@ lazy val scaladoc = configureAsSubproject(project)
)
.dependsOn(compiler)

// dependencies on compiler and compiler-interface are "provided" to align with scala3-sbt-bridge
lazy val sbtBridge = configureAsSubproject(project, srcdir = Some("sbt-bridge"))
.settings(Osgi.settings)
.settings(AutomaticModuleName.settings("scala.sbtbridge"))
//.settings(fatalWarningsSettings)
.settings(
name := "scala2-sbt-bridge",
description := "sbt compiler bridge for Scala 2",
libraryDependencies += compilerInterfaceDep,
libraryDependencies += compilerInterfaceDep % Provided,
generateServiceProviderResources("xsbti.compile.CompilerInterface2" -> "scala.tools.xsbt.CompilerBridge"),
generateServiceProviderResources("xsbti.compile.ConsoleInterface1" -> "scala.tools.xsbt.ConsoleBridge"),
generateServiceProviderResources("xsbti.compile.ScaladocInterface2" -> "scala.tools.xsbt.ScaladocBridge"),
Expand All @@ -651,7 +652,7 @@ lazy val sbtBridge = configureAsSubproject(project, srcdir = Some("sbt-bridge"))
|additional information regarding copyright ownership.
|""".stripMargin)),
)
.dependsOn(compiler, replFrontend, scaladoc)
.dependsOn(compiler % Provided, replFrontend, scaladoc)

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

0 comments on commit 33c45fc

Please sign in to comment.