Skip to content

Fix eager task realization in LombokPlugin and JavadocLinksPlugin - #1659

Merged
larsgrefer merged 1 commit into
mainfrom
fix/eager-task-realization
Feb 12, 2026
Merged

larsgrefer merged 1 commit into
mainfrom
fix/eager-task-realization

Conversation

@Frisch12

Copy link
Copy Markdown
Member

Replace .get() calls on TaskProvider with flatMap() to avoid eager task realization during configuration phase.

Changes:

  • LombokPlugin: Use flatMap(LombokConfig::getOutputFile) instead of get().getOutputFile() when wiring task inputs
  • JavadocLinksPlugin: Use flatMap(Javadoc::getJavadocTool) instead of get().getJavadocTool() when setting convention
  • JavadocLinksPlugin: Chain providers properly with flatMap() before calling get() only when necessary inside lazy configure block

This enables proper task configuration avoidance and improves build performance by not configuring tasks until they are actually needed.

Replace .get() calls on TaskProvider with flatMap() to avoid eager task
realization during configuration phase.

Changes:
- LombokPlugin: Use flatMap(LombokConfig::getOutputFile) instead of
  get().getOutputFile() when wiring task inputs
- JavadocLinksPlugin: Use flatMap(Javadoc::getJavadocTool) instead of
  get().getJavadocTool() when setting convention
- JavadocLinksPlugin: Chain providers properly with flatMap() before
  calling get() only when necessary inside lazy configure block

This enables proper task configuration avoidance and improves build
performance by not configuring tasks until they are actually needed.
@Frisch12
Frisch12 requested a review from larsgrefer February 12, 2026 17:24
@larsgrefer
larsgrefer merged commit ae32eef into main Feb 12, 2026
13 checks passed
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.

2 participants