Skip to content

Commit

Permalink
Apply 'jacoco' only on Java 9 or older
Browse files Browse the repository at this point in the history
  • Loading branch information
sormuras committed Mar 1, 2018
1 parent 346ed5a commit 634c1ea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions junit5-gradle-consumer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ ext.junitPlatformVersion = '1.1.0'
ext.junitJupiterVersion = '5.1.0'
ext.log4jVersion = '2.9.0'

int javaVersion = Integer.valueOf((String) JavaVersion.current().getMajorVersion())

apply plugin: 'java'
apply plugin: 'jacoco'
if (javaVersion < 10) apply plugin: 'jacoco'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'maven'
Expand Down Expand Up @@ -42,7 +44,7 @@ test {
html.enabled = true
}

finalizedBy jacocoTestReport
if (javaVersion < 10) finalizedBy jacocoTestReport
}

dependencies {
Expand Down

0 comments on commit 634c1ea

Please sign in to comment.