Skip to content

Conversation

jclyne
Copy link
Contributor

@jclyne jclyne commented Sep 26, 2025

Moves capture of the project version to execution time to avoid a gradle configuration cache issue

Motivation and Context

Improves support for configuration cache

How Has This Been Tested?

Its been tested locally and removes the gradle warning

Breaking Changes

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@Copilot Copilot AI review requested due to automatic review settings September 26, 2025 18:00
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a Gradle configuration cache issue by capturing the project version at configuration time instead of accessing it during task execution. The change moves the version capture from inside the doLast block to the task configuration phase, storing it in a local variable that's then used in the generated code.

  • Captures project version at configuration time to avoid configuration cache warnings
  • Updates the generated LibVersion.kt file to use the captured version variable

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kpavlov kpavlov force-pushed the fix-configuration-cache-issue branch 2 times, most recently from 44621f9 to fe1ba4c Compare September 28, 2025 03:30
Copy link
Contributor

@kpavlov kpavlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @jclyne

@kpavlov kpavlov requested a review from devcrocod September 28, 2025 04:02
@kpavlov kpavlov force-pushed the fix-configuration-cache-issue branch from fe1ba4c to 16cd5c9 Compare September 29, 2025 07:12
Copy link
Contributor

@devcrocod devcrocod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!
lgtm

@devcrocod devcrocod merged commit 8958f4c into modelcontextprotocol:main Sep 29, 2025
3 checks passed
@jclyne jclyne deleted the fix-configuration-cache-issue branch October 3, 2025 16:31
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.

3 participants