Compatibility with Other Plugins

License plugin

The License plugin is a really useful plugin to help with maintenance of license headers in source code. One standard feature of this plugin is to scan all source sets for license governance. Unfortunately this detects the source sets that are added by GradleTest itself which has its own internally generated license headers.

There is an open issue against this, but for now the best workaround is to exclude the test code generated by GradleTest.

Configuring licence plugin for exclusion
license {
  exclude '**/*.dsl.groovySpec.groovy'
  exclude '**/*.dsl.kotlinSpec.groovy'
}

CodeNarc plugin

When adding GradleTest to a project that also has codenarc configured, the tests generated by GradleTest will be scanned by CodeNarc.

Configuring CodeNarc to ignore GradleTest
codenarcGradleTest.enabled = false

Jacoco plugin

When the Jacoco plugin is added, coverage will be added from all GradleTest tasks. The debug flag on GradleTest tasks are also set to`true` on order to enable this.