diff --git a/contrib/scoverage/src/ScoverageModule.scala b/contrib/scoverage/src/ScoverageModule.scala index 335643b67b3..4085ba2e333 100644 --- a/contrib/scoverage/src/ScoverageModule.scala +++ b/contrib/scoverage/src/ScoverageModule.scala @@ -87,6 +87,7 @@ trait ScoverageModule extends ScalaModule { outer: ScalaModule => def selfDir = T { T.ctx().dest / os.up / os.up } def dataDir = T { selfDir() / "data" } + def moduleDeps = outer.moduleDeps def sources = outer.sources def resources = outer.resources def scalaVersion = outer.scalaVersion() diff --git a/contrib/scoverage/test/resources/hello-world/core/src/Greet.scala b/contrib/scoverage/test/resources/hello-world/core/src/Greet.scala index 608becc9640..90830bbc8e7 100644 --- a/contrib/scoverage/test/resources/hello-world/core/src/Greet.scala +++ b/contrib/scoverage/test/resources/hello-world/core/src/Greet.scala @@ -3,4 +3,6 @@ object Greet { case Some(p) => s"Hello, ${p} ${name}!" case None => s"Hello, ${name}!" } + + val foo = Foo // testing module deps } diff --git a/contrib/scoverage/test/resources/hello-world/other/src/Foo.scala b/contrib/scoverage/test/resources/hello-world/other/src/Foo.scala new file mode 100644 index 00000000000..d3c853cc044 --- /dev/null +++ b/contrib/scoverage/test/resources/hello-world/other/src/Foo.scala @@ -0,0 +1 @@ +object Foo diff --git a/contrib/scoverage/test/src/HelloWorldTests.scala b/contrib/scoverage/test/src/HelloWorldTests.scala index 433e413b360..3d5a51149bc 100644 --- a/contrib/scoverage/test/src/HelloWorldTests.scala +++ b/contrib/scoverage/test/src/HelloWorldTests.scala @@ -15,10 +15,16 @@ object HelloWorldTests extends utest.TestSuite { } object HelloWorld extends HelloBase { + object other extends ScalaModule { + def scalaVersion = "2.12.4" + } + object core extends ScoverageModule { def scalaVersion = "2.12.4" def scoverageVersion = "1.3.1" + def moduleDeps = Seq(other) + object test extends ScoverageTests { override def ivyDeps = Agg(ivy"org.scalatest::scalatest:3.0.5") def testFrameworks = Seq("org.scalatest.tools.Framework")