-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2484 from tgodzik/add-abt-bridge
improvement: Use sbt bridge defined by the user
- Loading branch information
Showing
5 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
integrations/sbt-bloop/src/sbt-test/sbt-bloop/custom-bridge/build.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import bloop.integrations.sbt.BloopDefaults | ||
|
||
val foo = project | ||
.in(file(".") / "foo") | ||
.settings( | ||
scalaCompilerBridgeBinaryJar := Some(baseDirectory.value / "fake.jar") | ||
) | ||
|
||
val checkBloopFiles = taskKey[Unit]("Check bloop file contents") | ||
checkBloopFiles in ThisBuild := { | ||
val bloopDir = Keys.baseDirectory.value./(".bloop") | ||
val fooConfig = bloopDir./("foo.json") | ||
val config = BloopDefaults.unsafeParseConfig(fooConfig.toPath) | ||
val bridgeJars = config.project.scala.get.bridgeJars.map(_.map(_.toString)) | ||
val expectedJars = Some(List((Keys.baseDirectory.value / "foo" / "fake.jar").toString)) | ||
assert(bridgeJars == expectedJars) | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
integrations/sbt-bloop/src/sbt-test/sbt-bloop/custom-bridge/project/plugins.sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % sys.props.apply("plugin.version")) |
3 changes: 3 additions & 0 deletions
3
integrations/sbt-bloop/src/sbt-test/sbt-bloop/custom-bridge/test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
> foo/bloopGenerate | ||
> foo/test:bloopGenerate | ||
> checkBloopFiles |