Package io.pjacoco.gradle
Class PjacocoGradleExtension
java.lang.Object
io.pjacoco.gradle.PjacocoGradleExtension
DSL for the
io.github.beltian.pjacoco plugin:
pjacoco {
agentVersion.set("1.3.0") // default: the plugin's own version (DEFAULT_AGENT_VERSION)
port.set(6310)
includes.set(listOf("com.example.*"))
excludes.set(emptyList())
destfile.set(layout.buildDirectory.dir("pjacoco"))
attachTo.set(listOf("integrationTest")) // task names to auto-inject the agent into
}
The plugin also populates the read-only providers getAgentJvmArg() and
getControlUrlArg() for wiring the agent onto a separately-launched server.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract org.gradle.api.provider.Property<String>Read-only (plugin-populated): the composed-javaagent:...argument.abstract org.gradle.api.provider.Property<String>Version ofio.github.beltian.pjacoco:pjacoco-agentto resolve.abstract org.gradle.api.provider.Property<Boolean>Write the whole-run aggregate.execat shutdown.abstract org.gradle.api.provider.Property<String>Aggregate file name (or absolute path).abstract org.gradle.api.provider.ListProperty<String>Names ofTest/JavaExectasks to auto-inject the agent (and control-url) into.abstract org.gradle.api.provider.Property<Boolean>Injectjunit.jupiter.extensions.autodetection.enabled=trueso the in-process JUnit 5 extension auto-applies suite-wide (no@ExtendWith).abstract org.gradle.api.provider.Property<String>Read-only (plugin-populated): the-Dpjacoco.control-url=...argument the testkit needs.abstract org.gradle.api.file.DirectoryPropertyOutput directory for per-test.execfiles.abstract org.gradle.api.provider.ListProperty<String>jacoco-style exclude patterns.abstract org.gradle.api.provider.ListProperty<String>jacoco-style include patterns (WildcardMatcher).abstract org.gradle.api.provider.Property<Boolean>Weave JUnit 4'srunLeaffor zero-touch per-test activation.abstract org.gradle.api.provider.Property<Integer>getPort()Control-endpoint port (also where the agent binds).
-
Constructor Details
-
PjacocoGradleExtension
public PjacocoGradleExtension()
-
-
Method Details
-
getAgentVersion
Version ofio.github.beltian.pjacoco:pjacoco-agentto resolve. -
getPort
Control-endpoint port (also where the agent binds). Default 6310. -
getIncludes
jacoco-style include patterns (WildcardMatcher). Empty → agent default*. -
getExcludes
jacoco-style exclude patterns. -
getDestfile
public abstract org.gradle.api.file.DirectoryProperty getDestfile()Output directory for per-test.execfiles. Defaultbuild/pjacoco. -
getAttachTo
Names ofTest/JavaExectasks to auto-inject the agent (and control-url) into. -
getAutoDetectExtensions
Injectjunit.jupiter.extensions.autodetection.enabled=trueso the in-process JUnit 5 extension auto-applies suite-wide (no@ExtendWith). Default true; set false to opt out. -
getAggregate
Write the whole-run aggregate.execat shutdown. Default true. -
getAggregateFile
Aggregate file name (or absolute path). Unset → agent defaultaggregate.exec. -
getJunit4Auto
Weave JUnit 4'srunLeaffor zero-touch per-test activation. Default true. -
getAgentJvmArg
Read-only (plugin-populated): the composed-javaagent:...argument. -
getControlUrlArg
Read-only (plugin-populated): the-Dpjacoco.control-url=...argument the testkit needs.
-