Skip to content

fix: support the configuration cache when packaging the production jar (#24795) (CP: 25.2)#24803

Merged
vaadin-bot merged 1 commit into
25.2from
cherry-pick-24795-to-25.2-1782316559192
Jun 24, 2026
Merged

fix: support the configuration cache when packaging the production jar (#24795) (CP: 25.2)#24803
vaadin-bot merged 1 commit into
25.2from
cherry-pick-24795-to-25.2-1782316559192

Conversation

@vaadin-bot

Copy link
Copy Markdown
Collaborator

This PR cherry-picks changes from the original PR #24795 to branch 25.2.

Original PR description

Description

The production-mode token-restore action was added as a Jar.doFirst {} whose lambda captures the whole Project, which can't be serialized for the configuration cache. It's moved to the block where the vaadinBuildFrontendToken service is already in scope, and now captures that service provider instead of the Project.

Fixes #24794

Type of change

  • [x ] Bugfix
  • Feature

Checklist

  • [ x] I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/

  • [ x] I have added a description following the guideline.

  • [ x] The issue is created in the corresponding repository and I have referenced it.

  • [x ] I have performed self-review and corrected misspellings.

  • I have added tests to ensure my change is effective and works as intended.

  • New and existing tests are passing locally with my change.

There are no suitable existing tests for this, this is simply a regression fix. It affects any Gradle with the configuration cache active.

#24795)

## Description

The production-mode token-restore action was added as a Jar.doFirst {}
whose lambda captures the whole Project, which can't be serialized for
the configuration cache. It's moved to the block where the
vaadinBuildFrontendToken service is already in scope, and now captures
that service provider instead of the Project.

Fixes #24794

## Type of change

- [x ] Bugfix
- [ ] Feature

## Checklist

- [ x] I have read the contribution guide:
https://vaadin.com/docs/latest/guide/contributing/overview/
- [ x] I have added a description following the guideline.
- [ x] The issue is created in the corresponding repository and I have
referenced it.
- [x ] I have performed self-review and corrected misspellings.

- [ ] I have added tests to ensure my change is effective and works as
intended.
- [ ] New and existing tests are passing locally with my change.

There are no suitable existing tests for this, this is simply a
regression fix. It affects any Gradle with the configuration cache
active.

---------

Co-authored-by: Marco Collovati <marco@vaadin.com>
@vaadin-bot

Copy link
Copy Markdown
Collaborator Author

This PR is eligible for auto-merging policy, so it has been approved automatically. If there are pending conditions, auto merge (with 'squash' method) has been enabled for this PR [Message is sent from bot]

@vaadin-bot vaadin-bot enabled auto-merge (squash) June 24, 2026 16:06
@github-actions

Copy link
Copy Markdown

Test Results

 1 452 files  ±0   1 452 suites  ±0   1h 24m 58s ⏱️ + 5m 38s
10 270 tests ±0  10 202 ✅ ±0  68 💤 ±0  0 ❌ ±0 
10 742 runs  ±0  10 673 ✅ ±0  69 💤 ±0  0 ❌ ±0 

Results for commit 3d0ef8c. ± Comparison against base commit 57c0f69.

@vaadin-bot vaadin-bot merged commit 91c9d53 into 25.2 Jun 24, 2026
31 checks passed
@vaadin-bot vaadin-bot deleted the cherry-pick-24795-to-25.2-1782316559192 branch June 24, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants