Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,7 @@ gradle.buildFinished {
}
}
}

ext {
ext.jacocoVersion = "0.8.8"
}
3 changes: 1 addition & 2 deletions chainbase/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ description = "chainbase – a decentralized database for blockchain."

// Dependency versions
// ---------------------------------------
def jacocoVersion = "0.8.0"
def jansiVersion = "1.16"
// --------------------------------------

Expand Down Expand Up @@ -42,7 +41,7 @@ test {
}

jacoco {
toolVersion = jacocoVersion // See http://www.eclemma.org/jacoco/.
toolVersion = rootProject.ext.jacocoVersion // See http://www.eclemma.org/jacoco/.
}

jacocoTestReport {
Expand Down
20 changes: 18 additions & 2 deletions framework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,25 @@ def versions = [
]

jacoco {
toolVersion = "0.8.8"
toolVersion = rootProject.ext.jacocoVersion
}

tasks.withType(Test) {
def excludesOut = [];
doFirst {
fileTree(project(':framework').buildDir.toString()+ "/classes/java/main").files.collect {
file -> file.absolutePath
}.forEach {
def start = it.indexOf("org/")
def dollarIndex = it.indexOf("\$")
def end = dollarIndex == -1 ? it.indexOf(".") : dollarIndex
excludesOut.add(it.substring(start, end) + "*")
}
}
jacoco {
excludes = excludesOut
}
}

configurations {
checkstyleConfig
Expand Down Expand Up @@ -157,7 +173,7 @@ jacocoTestReport {
*/

offlinsCoverage {
jacocoVersion = '0.8.8' // Optional. By default `0.8.8`
jacocoVersion = rootProject.ext.jacocoVersion // Optional. By default `0.8.8`

reports {
html.enabled.set true // Optional. By default `true`
Expand Down
2 changes: 1 addition & 1 deletion plugins/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ apply plugin: 'application'
apply plugin: 'checkstyle'

jacoco {
toolVersion = "0.8.4"
toolVersion = rootProject.ext.jacocoVersion
}
def versions = [
checkstyle: '8.7',
Expand Down
Loading