Integrating Java
Gradle
Add the plugin to your build.gradle file, and configure JaCoCo to generate XML reports:
plugins {
...
id "io.bluecave.plugin" version "0.1.6"
id "jacoco" // If you haven't already added it
}
...
tasks {
test {
finalizedBy jacocoTestReport
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
}
}
}
If using Kotlin:
plugins {
...
id("io.bluecave.plugin") version "0.1.6"
}
You can now use the task bluecaveReport to analyze and report coverage to your Blue Cave project:
export BLUECAVE_TOKEN="<your project token>" # Please keep this a secret!
# The following is only required if running outside of GitHub Actions:
# export BLUECAVE_EXTRA_OPTS="-b <branch name, such as main> -c <commit hash to attribute this analysis to>"
# See https://docs.bluecave.io/ci/ for more information.
./gradlew bluecaveReport
Maven
Add the plugin to your pom.xml:
<build>
<plugins>
<plugin>
<groupId>io.bluecave</groupId>
<artifactId>bluecave-maven-plugin</artifactId>
<version>0.1.2</version>
</plugin>
<plugin> <!-- Add the JaCoCo plugin if it doesn't exist -->
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.11</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
You can now use bluecave:report after you run your tests to analyze and report coverage to your Blue Cave project:
export BLUECAVE_TOKEN="<your project token>" # Please keep this a secret!
# The following is only required if running outside of GitHub Actions:
# export BLUECAVE_EXTRA_OPTS="-b <branch name, such as main> -c <commit hash to attribute this analysis to>"
# See https://docs.bluecave.io/ci/ for more information.
./mvnw test
./mvnw bluecave:report
Bazel
Coming soon!