From 1760618cd1e2da347dfc36ec791c1feb4990e202 Mon Sep 17 00:00:00 2001 From: Gustavo Martin Morcuende Date: Fri, 23 Dec 2016 21:23:00 +0100 Subject: [PATCH] Using jacoco --- .../Gradle/spring-jpa-persistence/build.gradle | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/SpringJava/Gradle/spring-jpa-persistence/build.gradle b/SpringJava/Gradle/spring-jpa-persistence/build.gradle index 172c202..fd50eb9 100644 --- a/SpringJava/Gradle/spring-jpa-persistence/build.gradle +++ b/SpringJava/Gradle/spring-jpa-persistence/build.gradle @@ -15,6 +15,7 @@ buildscript { apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'idea' +apply plugin: 'jacoco' apply plugin: 'com.ewerk.gradle.plugins.querydsl' @@ -100,12 +101,18 @@ test { testLogging { events "PASSED", "FAILED", "SKIPPED" } + + jacoco { + append = false + destinationFile = file("$buildDir/jacoco/jacoco.exec") + classDumpFile = file("$buildDir/jacoco/classpathdumps") + } } querydsl { library = 'com.querydsl:querydsl-apt:4.1.3' - querydslSourcesDir = "${buildDir}/generated-sources/querydsl" + querydslSourcesDir = "$buildDir/generated-sources/querydsl" jpa = true } @@ -116,3 +123,15 @@ jar { } } +jacoco { + toolVersion = '0.7.6.201602180812' + reportsDir = file("$buildDir/reports/jacoco") +} + +jacocoTestReport { + reports { + xml.enabled false + csv.enabled false + html.destination "${buildDir}/jacoco/" + } +} -- 2.1.4