Includes information about Gradle processes in the Build Scans or in the build output. The plugin is compatible with configuration cache.
Apply the plugin in the main build.gradle(.kts)
configuration file:
Using the plugins DSL:
plugins {
id("io.github.cdsap.gradleprocess") version "0.1.2"
}
Using legacy plugin application:
buildscript {
repositories {
gradlePluginPortal()
}
dependencies {
classpath("io.github.cdsap:infogradleprocess:0.1.2")
}
}
apply(plugin = "io.github.cdsap.gradleprocess")
Using the plugins DSL:
plugins {
id "io.github.cdsap.gradleprocess" version "0.1.2"
}
Using legacy plugin application:
buildscript {
repositories {
gradlePluginPortal()
}
dependencies {
classpath "io.github.cdsap:infogradleprocess:0.1.2"
}
}
apply plugin: "io.github.cdsap.gradleprocess"
If you are using Develocity, the information about the Gradle processes will be included as custom value in the Build Scan:
The field Usage
represents the value obtained at the end of the build using jstat
on the JVM process.
Note
Develocity 2024.2 provides new resource usage endpoints with detailed information about the different build and child processes during the execution: https://docs.gradle.com/develocity/api-manual/ref/2024.2.html#tag/Builds/operation/GetGradleResourceUsage
If you are not using Gradle Enterprise, the information about the Gradle processes will be included at the end of the build:
> Task :core:ui:compileProdDebugKotlin
┌─────────────────────────────────────────────────────────────────────────────┐
│ Gradle processes │
├─────────┬──────────┬───────────┬────────────┬───────────────┬───────────────┤
│ PID │ Max │ Usage │ Capacity │ GC Time │ Uptime │
├─────────┼──────────┼───────────┼────────────┼───────────────┼───────────────┤
│ 10865 │ 1.0 Gb │ 0.66 Gb │ 1.0 Gb │ 0.0 minutes │ 0.0 minutes │
├─────────┼──────────┼───────────┼────────────┼───────────────┼───────────────┤
│ 9011 │ 0.5 Gb │ 0.2 Gb │ 0.5 Gb │ 0.0 minutes │ 0.0 minutes │
└─────────┴──────────┴───────────┴────────────┴───────────────┴───────────────┘
BUILD SUCCESSFUL in 35s
- Gradle 7.5+
com.gradle:develocity-gradle-plugin
com.gradle.enterprise:com.gradle.enterprise.gradle.plugin
com.jakewharton.picnic:picnic