Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inherit moduleDeps from outer in Scoverage #623

Merged
merged 2 commits into from
Jun 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions contrib/scoverage/src/ScoverageModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ object Greet {
case Some(p) => s"Hello, ${p} ${name}!"
case None => s"Hello, ${name}!"
}

val foo = Foo // testing module deps
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
object Foo
6 changes: 6 additions & 0 deletions contrib/scoverage/test/src/HelloWorldTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down