Skip to content
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

Fix configuration cache for syncComposeResourcesForIos #3764

Merged
merged 4 commits into from
Oct 3, 2023

Conversation

eymar
Copy link
Member

@eymar eymar commented Oct 3, 2023

Currently when org.gradle.configuration-cache=true we have an error:

Configuration cache state could not be cached: field resourceFiles of task :shared:syncComposeResourcesForIos of type org.jetbrains.compose.experimental.uikit.tasks.SyncComposeResourcesForIosTask: error writing value of type 'org.gradle.api.internal.provider.TransformBackedProvider'

Old description (can be ignored):
This PR attempts to fix it in SyncComposeResourcesForIosTask by wrapping inputs into providers. It seems that gradle configuration cache doesn't like some provider types produced by .map, .zip, .orElse, etc.

Latest description:
With configuration cache enabled, gradle runs all orElse providers during configuration (I don't know why yet).
We used to throw an exception in orElse which led to the crash. This PR refactors SyncComposeResourcesForIosTask so it doesn't throw an exception immediately in orElse, but postpones it to later step.

eymar added 4 commits October 3, 2023 12:25
Configuration cache state could not be cached: field `resourceFiles` of task `:shared:syncComposeResourcesForIos` of type `org.jetbrains.compose.experimental.uikit.tasks.SyncComposeResourcesForIosTask`: error writing value of type 'org.gradle.api.internal.provider.TransformBackedProvider'
@eymar eymar requested a review from pjBooms October 3, 2023 16:07
@eymar eymar merged commit ff59c48 into master Oct 3, 2023
@eymar eymar deleted the fix_gradle_plugin_configuration_cache branch October 3, 2023 17:35
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