Gradle plugin¶
The Daemonitor Gradle plugin (io.github.cdsap.daemonitor, published to the Gradle Plugin Portal) is an optional Settings plugin that associates daemonitor-cored process resource collection with a specific Gradle invocation, producing a process measurement summary (build/daemonitor/observation-summary.json) and optional Develocity custom values.
You do not need this plugin for interactive Desktop or daemonitor-cli monitoring—those work passively without modifying any Gradle project. Apply the plugin when you want per-build metrics in CI or local builds without running an interactive monitor.
Requirements¶
daemonitor-coredreachable on the default local socket (installed via the Desktop app ordaemonitor-clipackage from GitHub Releases), or configured via-Pdaemonitor.cored.socket=/path/to/cored.sock.- If
daemonitor-coredis not running, the plugin warns and skips measurement without failing the build.
Installation¶
Apply io.github.cdsap.daemonitor as a Settings plugin in settings.gradle.kts (not build.gradle.kts):
Configuration¶
Configure via Gradle project properties (gradle.properties or -P flags):
| Property | Default | Effect |
|---|---|---|
daemonitor.gbos.enabled |
true |
Enables local summary report and optional GBOS / Develocity Build Scan projection |
daemonitor.cored.socket |
Default daemonitor-cored local socket |
Override the daemonitor-cored Unix socket path |
Observation session lifecycle and output¶
- At build start, the plugin opens a named observation session on
daemonitor-cored(POST /v1/observation-sessions/open). - While the build runs,
daemonitor-coredcontinues sampling build processes (GRADLE_DAEMON,KOTLIN_DAEMON, workers, etc.). - At build end, the plugin closes the session (
POST /v1/observation-sessions/close), receives one build-scoped summary (RSS, and heap/GC when HotSpot probing succeeded), and writes: build/daemonitor/observation-summary.json- Optional GBOS custom values into Develocity Build Scans when Develocity is on the classpath.
Fallback behavior¶
The plugin is strictly soft-fail: if daemonitor-cored is unreachable, times out, or returns an error, the plugin logs a warning and skips measurement so the Gradle build still succeeds.