Skip to content

KRPC-245 Fix eager configuration resolution warning in Gradle 9.0 - #651

Merged
Mr3zee merged 2 commits into
mainfrom
fix/KRPC-245
Apr 8, 2026
Merged

KRPC-245 Fix eager configuration resolution warning in Gradle 9.0#651
Mr3zee merged 2 commits into
mainfrom
fix/KRPC-245

Conversation

@Mr3zee

@Mr3zee Mr3zee commented Apr 7, 2026

Copy link
Copy Markdown
Member

Subsystem

Gradle Plugin (protoc/buf)

Problem Description

KRPC-245 — Three Gradle configurations (protocGenKotlinMultiplatformJar, protocGenGrpcKotlinMultiplatformJar, bufExecutable) are resolved during configuration time, producing warnings in Gradle 9.0:

Configuration 'protocGenKotlinMultiplatformJar' was resolved during configuration time.
This is a build performance and scalability issue.

This only manifests in user projects (not in the kotlinx-rpc build itself) because internally the protoc-gen jars come from included builds.

Solution

Replace project.provider { config.get().singleFile } with config.flatMap { it.elements.map { ... } } in two sites:

  • pluginJars.kt:jarPathAccessor() — resolves protocGenKotlinMultiplatformJar and protocGenGrpcKotlinMultiplatformJar
  • BufExecTask.kt:registerBufExecTask() — resolves bufExecutable

Configuration.elements returns a Provider<Set<FileSystemLocation>> that Gradle tracks as a proper lazy dependency, deferring resolution to task execution time instead of configuration time.


Note

This is a fully autonomous autogenerated PR. No human reviewed the code before submission.

🤖 Generated with Claude Code

Replace `project.provider { config.get().singleFile }` with
`config.flatMap { it.elements.map { it.single().asFile } }` so that
protocGenKotlinMultiplatformJar, protocGenGrpcKotlinMultiplatformJar,
and bufExecutable configurations are resolved lazily through Gradle's
provider chain instead of during configuration time.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Mr3zee Mr3zee added bug Something isn't working infra Infrastructure changes (Gradle, CI, project setup, etc) labels Apr 7, 2026
@Mr3zee
Mr3zee marked this pull request as ready for review April 7, 2026 21:39
- CancellationTest.testCancelServer: 30s timeout on native (KRPC-548)
- GrpcTimeoutTest short milliseconds: race on macosArm64 (KRPC-549)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Mr3zee
Mr3zee merged commit d3973f3 into main Apr 8, 2026
8 checks passed
@Mr3zee
Mr3zee deleted the fix/KRPC-245 branch April 8, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working infra Infrastructure changes (Gradle, CI, project setup, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant