How to configure JaCoCo Gradle plugin from command line
The same way as other Gradle plugins - using initialization scripts, however be aware of https://github.com/gradle/gradle/issues/1262 and https://github.com/gradle/gradle/issues/1322 which among other things say that plugins that are not part of Gradle distribution can not be applied using id and should use type. While JaCoCo plugin is part of distribution, here is example that uses type - given following jacoco.gradle
allprojects {
apply plugin: org.gradle.testing.jacoco.plugins.JacocoPlugin
}
execution of gradle --init-script jacoco.gradle tasks --all
shows that task jacocoTestReport
appears in project.