Skip to content

fix: refactor kotlin process collection to a shared core component - #83

Merged
cdsap merged 1 commit into
mainfrom
issue/82-hermes-refactor-kotlin-process-collection-t-a1
Aug 28, 2026
Merged

fix: refactor kotlin process collection to a shared core component#83
cdsap merged 1 commit into
mainfrom
issue/82-hermes-refactor-kotlin-process-collection-t-a1

Conversation

@cdsap

@cdsap cdsap commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Summary

Problem

src/main/kotlin/io/github/cdsap/kotlinprocess/InfoKotlinProcessBuildService.kt and src/main/kotlin/io/github/cdsap/kotlinprocess/DevelocityWrapperConfiguration.kt both directly instantiate ConsolidateProcesses and know that the parser must use TypeProcess.Kotlin. That duplicates core Kotlin-process collection behavior inside two delivery paths: console reporting and Develocity reporting.

Why this matters

Keeping the collection rule embedded in infrastructure adapters makes future parser changes easier to apply inconsistently and makes the reporting paths harder to test independently from process consolidation.

Proposed change

Introduce one small shared component, for example KotlinProcessCollector, that accepts the jStat and jInfo providers or raw strings and returns the consolidated Kotlin Process list. Update both console and Develocity paths to call it, preserving current output and Build Scan values.

Notes

From a clean architecture lens, process collection is core behavior while console output and Develocity Build Scan publishing are adapters. This refactor keeps the boundary small without changing public plugin behavior.

Fixes #82

Changes

  • src/main/kotlin/io/github/cdsap/kotlinprocess/DevelocityWrapperConfiguration.kt
  • src/main/kotlin/io/github/cdsap/kotlinprocess/KotlinProcessCollector.kt
  • src/test/kotlin/io/github/cdsap/kotlinprocess/KotlinProcessCollectorTest.kt

Verification

  • ./gradlew ktlintCheck
  • ./gradlew test

@cdsap
cdsap merged commit 170338a into main Aug 28, 2026
23 checks passed
@cdsap
cdsap deleted the issue/82-hermes-refactor-kotlin-process-collection-t-a1 branch August 28, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor Kotlin process collection to a shared core component

1 participant