diff --git a/.travis.yml b/.travis.yml index 11a179071..abe8e81f9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,13 @@ jdk: - openjdk8 - openjdk7 +# Use JDK8 for startup, since JDK7 has issues with TLS when downloading plugins +install: + - JAVA_HOME=$(jdk_switcher home openjdk8) gradle classes testClasses + branches: only: - master + +after_success: + - gradle jacocoTestReport coveralls diff --git a/build.gradle b/build.gradle index 177786adf..2d66c8e58 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,7 @@ +plugins { + id 'com.github.kt3k.coveralls' version '2.6.3' +} + apply plugin: 'checkstyle' apply plugin: 'jacoco' apply plugin: 'java' @@ -123,8 +127,17 @@ task integrationTestJWT(type: Test) { } } +jacoco { + reportsDir = file("$buildDir/reports/jacoco") +} -jacocoTestReport.dependsOn(integrationTest); +jacocoTestReport { + reports { + xml.enabled = true // coveralls plugin depends on xml format report + html.enabled = true + } +} +//jacocoTestReport.dependsOn(check) tasks.withType(JavaCompile) { options.compilerArgs << '-Xlint:all'