Skip to content

Fix Gradle configuration cache regression from #918#934

Open
mrmegapolys wants to merge 1 commit intoNetflix:masterfrom
mrmegapolys:fix/configuration-cache-jackson-detection
Open

Fix Gradle configuration cache regression from #918#934
mrmegapolys wants to merge 1 commit intoNetflix:masterfrom
mrmegapolys:fix/configuration-cache-jackson-detection

Conversation

@mrmegapolys
Copy link
Copy Markdown

@mrmegapolys mrmegapolys commented Apr 15, 2026

JacksonVersionDetector.detectVersions(project) was called in the @TaskAction generate() method, accessing Task.project at execution time — unsupported with Gradle configuration cache.

Moves Jackson version detection to configuration time by adding a @Input jacksonVersions property to GenerateJavaTask and resolving it in the plugin's afterEvaluate block (after ClientUtilsConventions to avoid resolving compileClasspath before all dependencies are declared).

Fixes #933

@mrmegapolys mrmegapolys force-pushed the fix/configuration-cache-jackson-detection branch from 4c4b60c to a209810 Compare April 15, 2026 05:06
@mrmegapolys mrmegapolys marked this pull request as draft April 15, 2026 05:11
@mrmegapolys mrmegapolys force-pushed the fix/configuration-cache-jackson-detection branch from a209810 to 949c923 Compare April 15, 2026 05:17
JacksonVersionDetector.detectVersions(project) was called in the
@TaskAction method, accessing Task.project at execution time which
is unsupported with configuration cache.

Move Jackson version detection to configuration time by adding a
@input property to GenerateJavaTask and resolving it in the plugin
afterEvaluate block.

Fixes Netflix#933
@mrmegapolys mrmegapolys force-pushed the fix/configuration-cache-jackson-detection branch from 949c923 to dde1322 Compare April 15, 2026 05:48
@mrmegapolys mrmegapolys marked this pull request as ready for review April 15, 2026 05:54
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.

GenerateJavaTask breaks Gradle configuration cache in 8.4.1 (regression from #918)

1 participant