Skip to content

Commit

Permalink
Add aliases for compile:jacoco, test:jacoco & it:jacoco
Browse files Browse the repository at this point in the history
  • Loading branch information
stringbean committed Sep 10, 2017
1 parent bb34ba0 commit 5c388e2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/scala/org/scalasbt/jacoco/JacocoItPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ object JacocoItPlugin extends BaseJacocoPlugin with Merging {
(jacocoSourceSettings in ItJacoco).value,
(streams in ItJacoco).value
),
jacocoReport in ItJacoco := ((jacocoReport in ItJacoco) dependsOn conditionalMerge).value
jacocoReport in ItJacoco := ((jacocoReport in ItJacoco) dependsOn conditionalMerge).value,
jacoco in IntegrationTest := (jacoco in ItJacoco).value
)
}
5 changes: 5 additions & 0 deletions src/main/scala/org/scalasbt/jacoco/JacocoPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,9 @@ object JacocoPlugin extends BaseJacocoPlugin {
lazy val srcConfig: Configuration = Test

override def trigger: PluginTrigger = allRequirements

override def projectSettings: Seq[Setting[_]] = super.projectSettings ++ Seq(
jacoco in Compile := (jacoco in Jacoco).value,
jacoco in Test := (jacoco in Jacoco).value
)
}
5 changes: 4 additions & 1 deletion src/sbt-test/sbt-jacoco/simple/test
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ $ exists target/scala-2.10/jacoco/classes
$ exists target/scala-2.10/jacoco/jacoco.exec

# html report
$ exists target/scala-2.10/jacoco/html/index.html
$ exists target/scala-2.10/jacoco/html/index.html

# testing using jacoco alias - should still fail
-> jacoco

0 comments on commit 5c388e2

Please sign in to comment.