Skip to content

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-cored reachable on the default local socket (installed via the Desktop app or daemonitor-cli package from GitHub Releases), or configured via -Pdaemonitor.cored.socket=/path/to/cored.sock.
  • If daemonitor-cored is 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):

// settings.gradle.kts
plugins {
    id("io.github.cdsap.daemonitor") version "0.1.3"
}

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

  1. At build start, the plugin opens a named observation session on daemonitor-cored (POST /v1/observation-sessions/open).
  2. While the build runs, daemonitor-cored continues sampling build processes (GRADLE_DAEMON, KOTLIN_DAEMON, workers, etc.).
  3. 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:
  4. build/daemonitor/observation-summary.json
  5. 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.