diff --git a/src/sbt-test/scoverage/aggregate/build.sbt b/src/sbt-test/scoverage/aggregate/build.sbt index 25724fe4..74c41221 100644 --- a/src/sbt-test/scoverage/aggregate/build.sbt +++ b/src/sbt-test/scoverage/aggregate/build.sbt @@ -1,8 +1,6 @@ /* The projects test aggregation of coverage reports from two sub-projects. - The sub-projects are in the irectories partA and partB. - The tests are against the sources of ScoverageSbtPlugin in the parent directory. - It might be possible to test other versions of ScoverageSbtPlugin. + The sub-projects are in the directories partA and partB. */ lazy val commonSettings = Seq( @@ -35,6 +33,3 @@ lazy val root = (project in file(".")) partA, partB ) - - - diff --git a/src/sbt-test/scoverage/aggregate/project/plugins.sbt b/src/sbt-test/scoverage/aggregate/project/plugins.sbt index 062e7340..0b154c5c 100644 --- a/src/sbt-test/scoverage/aggregate/project/plugins.sbt +++ b/src/sbt-test/scoverage/aggregate/project/plugins.sbt @@ -1,6 +1,15 @@ -/* - * ScoveragePlugin is constructed from the sources in the parent directory - */ -lazy val root = (project in file(".")).dependsOn(scoveragePlugin) +// The Typesafe repository +resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/" + +//scoverage needs this +resolvers += Classpaths.sbtPluginReleases + +{ + val pluginVersion = System.getProperty("plugin.version") + if(pluginVersion == null) + throw new RuntimeException("""|The system property 'plugin.version' is not defined. + |Specify this property using the scriptedLaunchOpts -D.""".stripMargin) + else addSbtPlugin("org.scoverage" %% "sbt-scoverage" % pluginVersion) +} + -lazy val scoveragePlugin = file("../../../..").getAbsoluteFile.toURI \ No newline at end of file diff --git a/src/sbt-test/scoverage/aggregate/test b/src/sbt-test/scoverage/aggregate/test index 013ff377..09537afb 100644 --- a/src/sbt-test/scoverage/aggregate/test +++ b/src/sbt-test/scoverage/aggregate/test @@ -1,2 +1,10 @@ -#this file is necessary for scripted plugin. See http://eed3si9n.com/testing-sbt-plugins -#it is empty for now \ No newline at end of file +# run scoverage using the coverage task +> clean +> coverage +> test +# There should be scoverage-data directory +$ exists partA/target/scala-2.10/scoverage-data +$ exists partB/target/scala-2.10/scoverage-data +> coverageAggregate +# There should be scoverage-data directory +$ exists target/scala-2.10/scoverage-report diff --git a/version.sbt b/version.sbt index 6d74fc2d..f5b6eb2b 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -version in ThisBuild := "1.3.3" +version in ThisBuild := "1.3.4"