Skip to content

Repository files navigation

Info Kotlin Process Plugin

Includes information about Kotlin processes in the Build Scans or in the build output. The plugin is compatible with configuration cache.

Usage

Apply the plugin in settings.gradle(.kts) so it observes the whole build, including all projects:

Kotlin (settings.gradle.kts)

Using the plugins DSL:

plugins {
  id("io.github.cdsap.kotlinprocess") version "0.3.0"
}

Groovy (settings.gradle)

Using the plugins DSL:

plugins {
  id "io.github.cdsap.kotlinprocess" version "0.3.0"
}

The legacy project-plugin application in build.gradle(.kts) remains supported for published consumers, but settings-plugin application is preferred for multi-project builds.

Legacy project application (build.gradle.kts)

plugins {
  id("io.github.cdsap.kotlinprocess") version "0.3.0"
}

Using legacy plugin application:

buildscript {
  repositories {
    gradlePluginPortal()
  }
  dependencies {
    classpath("io.github.cdsap:infokotlinprocess:0.3.0")
  }
}

apply(plugin = "io.github.cdsap.kotlinprocess")

Legacy project application (build.gradle)

plugins {
  id "io.github.cdsap.kotlinprocess" version "0.3.0"
}

Using legacy plugin application:

buildscript {
  repositories {
    gradlePluginPortal()
  }
  dependencies {
    classpath "io.github.cdsap:infokotlinprocess:0.3.0"
  }
}

apply plugin: "io.github.cdsap.kotlinprocess"

Output

Build Scans

If you are using Develocity, the information about the Kotlin 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.

GBOS observations

Build Scan GBOS output is opt-in. Enable it with a Gradle property:

infoKotlinProcess.gbos.develocity.enabled=true

or configure it in the settings script:

infoKotlinProcess {
    gbos {
        develocity.set(true)
    }
}

When enabled, GBOS observations replace the plugin's legacy Kotlin-Process-* Build Scan custom values; the plugin does not publish both formats in one scan. Without opt-in, the existing custom values and console output are unchanged. Each Kotlin daemon is reported as a jvm.process entity observation.

Build Output

If you are not using Develocity, the information about the Kotlin processes will be included at the end of the build:

> Task :core:ui:compileProdDebugKotlin
┌─────────────────────────────────────────────────────────────────────────────┐
│  Kotlin 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

Requirements

  • Gradle 7.5

Libraries

  • com.gradle:develocity-gradle-plugin
  • com.jakewharton.picnic:picnic

About

Include Kotlin process information in Build Scans or build output

Topics

Resources

Stars

44 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages