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

Do not access 'project.zipTree' in mapping closure #261

Merged
merged 3 commits into from Dec 13, 2023

Conversation

jjohannes
Copy link
Contributor

This is not supported by the Configuration Cache. Instead, we inject an ArchiveOperations service.

Fixes #229

Copy link
Owner

@melix melix left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @jjohannes! Instead of creating a subtask I would simply inject ArchiveOperations in the plugin then use it in the task.

@jjohannes
Copy link
Contributor Author

No problem. Happy I figured this out. I am also not super happy with the subclass.

I tried injecting via the plugin already. It's not working. The service property can't be found when the code in the closure executes (if CC is turned on).

I think this is, because the code executes after the state has been loaded from the cache. Which is the reason why there is a problem in the first place. At that point, the plugin context is not available anymore.

@jjohannes jjohannes force-pushed the fix-229 branch 2 times, most recently from bcf19d6 to b4de42b Compare December 11, 2023 11:54
@jjohannes
Copy link
Contributor Author

It can be injected via the plugin. "Just" need to store a reference in a variable while we can.

Updated the PR – PTAL.

This is not supported by the Configuration Cache. Instead, we inject
an ArchiveOperations service.

Fixes melix#229
@jjohannes
Copy link
Contributor Author

The test also starts failing (on master) with newer Gradle versions. Not sure anymore if what was reported in #261 is exactly this issue. But in any case this is an issue with Gradle 8.5.

@melix
Copy link
Owner

melix commented Dec 12, 2023

@jjohannes can you allow edits on your PR?

@jjohannes
Copy link
Contributor Author

can you allow edits on your PR?

Should be turned on.

@melix
Copy link
Owner

melix commented Dec 12, 2023

Strange, I get a permission denied 🤔

@jjohannes
Copy link
Contributor Author

Strange. The flag is set here in my UI. Feel free to just copy the solution into a new PR/branch.

@melix
Copy link
Owner

melix commented Dec 12, 2023

My bad, had a typo in the branch name

@melix melix merged commit 2c29b07 into melix:master Dec 13, 2023
2 checks passed
@jjohannes jjohannes deleted the fix-229 branch December 16, 2023 08:58
@jjohannes
Copy link
Contributor Author

Thank you @melix!

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.

jmhJar task is not compatible with Gradle configuration cache
2 participants