Skip to content

Commit

Permalink
Added integrated view of test coverage. Turn retro lambda off tempora…
Browse files Browse the repository at this point in the history
…rily
  • Loading branch information
mperry committed Aug 30, 2015
1 parent 87db1bd commit cf07489
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 15 deletions.
34 changes: 33 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ if (JavaVersion.current().isJava8Compatible()) {

allprojects {

apply plugin: "jacoco"

jacoco {
toolVersion = "0.7.1.201405082137"
}

defaultTasks "build"

ext {
Expand All @@ -43,7 +49,7 @@ allprojects {
fjConsumeVersion = "4.4"

signModule = false
useRetroLambda = true
useRetroLambda = false

projectTitle = "Functional Java"
projectName = "functionaljava"
Expand All @@ -70,6 +76,10 @@ allprojects {
retroLambdaTarget = JavaVersion.VERSION_1_7
}

repositories {
jcenter()
}

version = fjVersion
group = "org.functionaljava"

Expand All @@ -96,6 +106,28 @@ subprojects {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}

jacocoTestReport {
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
// html.destination "${buildDir}/jacocoHtml"
}
}

}

task coverageRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
dependsOn = subprojects.test
sourceDirectories = files(subprojects.sourceSets.main.allSource.srcDirs)
classDirectories = files(subprojects.sourceSets.main.output)
executionData = files(subprojects.jacocoTestReport.executionData)
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
}

configure(subprojects.findAll { it.name != "props-core" }) {
Expand Down
2 changes: 2 additions & 0 deletions consume/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ archivesBaseName = "${project.projectName}-${project.name}"

dependencies {
compile("$group:$projectName:$fjConsumeVersion")

testCompile dependencyJunit
}
18 changes: 18 additions & 0 deletions consume/src/test/java/fj/EmptyTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package fj;

import org.junit.Ignore;
import org.junit.Test;

import org.junit.Assert;

/**
* Created by MarkPerry on 30/08/2015.
*/
public class EmptyTest {

@Ignore @Test
public void missing() {
Assert.fail("not implemented");

}
}
14 changes: 0 additions & 14 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

apply plugin: "jacoco"

ext {
signModule = true
}
Expand All @@ -18,18 +16,6 @@ uploadArchives.enabled = true

configureAllRetroLambda()

jacoco {
toolVersion = "0.7.1.201405082137"
}

jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination "${buildDir}/jacocoHtml"
}
}

task coverage(dependsOn: ["test", "jacocoTestReport"]) << {

}
18 changes: 18 additions & 0 deletions demo/src/test/java/fj/EmptyTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package fj;

import org.junit.Ignore;
import org.junit.Test;

import org.junit.Assert;

/**
* Created by MarkPerry on 30/08/2015.
*/
public class EmptyTest {

@Ignore @Test
public void missing() {
Assert.fail("not implemented");

}
}
17 changes: 17 additions & 0 deletions java-core/src/test/java/fj/EmptyTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package fj;

import org.junit.Ignore;
import org.junit.Test;
import org.junit.Assert;

/**
* Created by MarkPerry on 30/08/2015.
*/
public class EmptyTest {

@Ignore @Test
public void missing() {
Assert.fail("not implemented");

}
}
17 changes: 17 additions & 0 deletions java8/src/test/java/fj/EmptyTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package fj;

import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;

/**
* Created by MarkPerry on 30/08/2015.
*/
public class EmptyTest {

@Ignore @Test
public void missing() {
Assert.fail("not implemented");

}
}

0 comments on commit cf07489

Please sign in to comment.