I applied jacoco plugin via init.gradle.
What I want to enable is as follows:
- test without jacoco
- test with jacoco
initscript {
repositories {
mavenCentral()
}
}
allprojects {
apply plugin: 'java'
apply plugin: 'jacoco'
jacoco {
toolVersion = '0.8.11'
}
test {
jacoco {
destinationFile = file("$buildDir/jacoco/jacoco.exec")
}
}
}
This is my init.gradle. I need just jacoco.exec as the output of jacoco.
I also tried registering new task, but it seems that there is no way to test without jacoco.