-
Notifications
You must be signed in to change notification settings - Fork 25
Add Gradle Configuration Cache Support #272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
tnj
wants to merge
9
commits into
master
Choose a base branch
from
feat/support-configuration-cache
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implement full Configuration Cache compatibility for the DeployGate plugin to improve build performance and enable caching of task configuration. Changes: - Add endpoint property to upload tasks to eliminate project access during execution - Replace @internal with @nested annotations for proper input tracking - Use Gradle logging instead of System.out for Configuration Cache compliance - Defer file operations from configuration to execution time - Add endpoint configuration to DeployGateExtension with default value - Update task configuration to capture endpoint for browser opening This enables faster incremental builds and better build reproducibility when using Gradle's Configuration Cache feature. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Replace direct project.deploygate access with Provider API - Remove static state from GradleCompat and use provider-based approach - Pass AGP version through BuildService parameters instead of static access - Replace Config.shouldOpenAppDetailAfterUpload() with Provider-based approach - Add proper @Input/@output annotations to task properties - Fix eager property access in task getDescription() methods - Maintain backward compatibility with Gradle 6.7.1+ - Preserve variant name display in task descriptions BREAKING CHANGE: None - all changes maintain backward compatibility 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Updated PackageAppTaskCompat to accept AGP version as a parameter for APK and AAB info retrieval. - Modified AndroidGradlePlugin to remove static AGP version caching and introduced version string parameterization. - Enhanced HttpClient to include plugin version details in HTTP headers. - Refactored BrowserUtils to support configuration cache with ProviderFactory, ensuring environment checks are deferred. - Improved LoginTask and UploadArtifactTask to utilize ProviderFactory for browser opening logic. - Added ConfigurationCacheSpec to validate plugin compatibility with Gradle's configuration cache feature. - Created TestHelper and TaskTestHelper classes to streamline test setup and reduce boilerplate code. - Implemented BrowserUtilsConfigurationCacheSpec to ensure provider-based methods work correctly without direct system access. - Updated UploadArtifactTaskSpec to utilize new input parameter handling and provider factory integration.
- Add missing @input and @InputFile annotations to AabInfo and ApkInfo interfaces - Fix BrowserUtils to use forUseAtConfigurationTime() wrapper for Provider access - Add release build type configuration to ConfigurationCacheSpec tests - Prevent browser from actually opening during BrowserUtilsConfigurationCacheSpec tests All tests now pass successfully with configuration cache enabled. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Fix BrowserUtilsSpec to mock hasBrowserLegacy instead of hasBrowser The openBrowser(String) method delegates to legacy implementation - Fix BrowserUtilsConfigurationCacheSpec provider chain test Use mock providers instead of actual environment access to avoid configuration time provider evaluation issues 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Fix BrowserUtilsSpec test by mocking CI environment check - Update BrowserUtilsConfigurationCacheSpec to use parameterized tests with mock providers - Fix UploadArtifactTask to remove extra .get() call on Boolean value 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
| task.dependsOn(Constants.uploadAabTaskName(deployment.name)) | ||
| } | ||
|
|
||
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[spotless] reported by reviewdog 🐶
Suggested change
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes #148 and #270
This PR adds full support for Gradle's configuration cache feature to the DeployGate plugin, enabling faster builds through cached configuration reuse.
Changes
HttpClientBuildService to receive AGP version and pluginversion through parameters instead of static access, eliminating configuration-time reads
with proper
forUseAtConfigurationTime()handling for Gradle 6.x compatibilityAndroidGradlePluginand updatedBrowserUtilstoaccept Provider parameters instead of direct system access
@Input/@Outputannotations for proper serialization
time using Provider mapping
Testing
ConfigurationCacheSpectest suite verifying all plugin functionalityBrowserUtilsConfigurationCacheSpecfor environment handling tests