public final class JkJacoco
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
JkJacoco.RepoToolProvider |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_VERSION |
static java.lang.String |
OUTPUT_HTML_RELATIVE_PATH |
static java.lang.String |
OUTPUT_RELATIVE_PATH
Relative location to the output folder of the generated jacoco report file
|
static java.lang.String |
OUTPUT_XML_RELATIVE_PATH |
| Modifier and Type | Method and Description |
|---|---|
JkJacoco |
addAgentOptions(java.lang.String... args) |
JkJacoco |
addReportOptions(java.lang.String... args)
See ... for report option
|
void |
applyTo(dev.jeka.core.api.testing.JkTestProcessor testProcessor)
Applies this Jacoco settings to the specified
JkTestProcessor, in order
it runs with Jacoco. |
JkJacoco |
configureAndApplyTo(dev.jeka.core.api.project.JkProject project)
Concise method for configuring Jacoco based on the specified project and applying the settings to the designated
project's testProcessor.
|
JkJacoco |
configureFor(dev.jeka.core.api.project.JkProject project)
Configures Jacoco settings in accordance to the specified project.
|
void |
generateExport()
Generates XML and HTML reports from the exec report file.
|
java.nio.file.Path |
getAgentJar()
The agent jar path, used to instrument tests
|
java.nio.file.Path |
getExecFile()
Exec file is the binary report file generated by Jacoco
|
java.util.List<java.lang.String> |
getReportOptions() |
static JkJacoco |
ofVersion(dev.jeka.core.api.depmanagement.resolution.JkDependencyResolver dependencyResolver,
java.lang.String version)
Returns the
JkJacoco object relying on jacoco-agent and jacoco-cli hosted on repository. |
static JkJacoco |
ofVersion(dev.jeka.core.api.depmanagement.JkRepoSet repos,
java.lang.String version) |
static JkJacoco |
ofVersion(java.lang.String version) |
JkJacoco |
setClassDir(java.nio.file.Path classDir)
Necessary to produce XML report
|
JkJacoco |
setClassDirFilter(dev.jeka.core.api.file.JkPathMatcher pathMatcher) |
JkJacoco |
setClassDirFilter(java.lang.String pathDirExcludes) |
JkJacoco |
setExecFile(java.nio.file.Path destFile) |
JkJacoco |
setHtmlReport(boolean htmlReport) |
JkJacoco |
setSources(java.util.List<java.nio.file.Path> sourceDirs) |
JkJacoco |
setXmlReport(boolean xmlReport) |
public static final java.lang.String OUTPUT_RELATIVE_PATH
public static final java.lang.String OUTPUT_XML_RELATIVE_PATH
public static final java.lang.String OUTPUT_HTML_RELATIVE_PATH
public static final java.lang.String DEFAULT_VERSION
public static JkJacoco ofVersion(dev.jeka.core.api.depmanagement.resolution.JkDependencyResolver dependencyResolver, java.lang.String version)
JkJacoco object relying on jacoco-agent and jacoco-cli hosted on repository.public static JkJacoco ofVersion(dev.jeka.core.api.depmanagement.JkRepoSet repos, java.lang.String version)
ofVersion(JkDependencyResolver, String)public static JkJacoco ofVersion(java.lang.String version)
ofVersion(JkDependencyResolver, String)public JkJacoco configureFor(dev.jeka.core.api.project.JkProject project)
public JkJacoco configureAndApplyTo(dev.jeka.core.api.project.JkProject project)
public void applyTo(dev.jeka.core.api.testing.JkTestProcessor testProcessor)
JkTestProcessor, in order
it runs with Jacoco.public JkJacoco setHtmlReport(boolean htmlReport)
htmlReport - if true, produces an xml report.public JkJacoco setXmlReport(boolean xmlReport)
xmlReport - if true, produces an xml report.public JkJacoco setExecFile(java.nio.file.Path destFile)
public JkJacoco addAgentOptions(java.lang.String... args)
public JkJacoco setClassDir(java.nio.file.Path classDir)
public JkJacoco setClassDirFilter(dev.jeka.core.api.file.JkPathMatcher pathMatcher)
public JkJacoco setClassDirFilter(java.lang.String pathDirExcludes)
public JkJacoco addReportOptions(java.lang.String... args)
public JkJacoco setSources(java.util.List<java.nio.file.Path> sourceDirs)
public java.util.List<java.lang.String> getReportOptions()
public void generateExport()
public java.nio.file.Path getAgentJar()
public java.nio.file.Path getExecFile()