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

ForceDependencyResolutionPlugin incompatible with Project isolation #109

Open
hfhbd opened this issue Feb 6, 2024 · 2 comments
Open

ForceDependencyResolutionPlugin incompatible with Project isolation #109

hfhbd opened this issue Feb 6, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@hfhbd
Copy link

hfhbd commented Feb 6, 2024

The plugin ForceDependencyResolutionPlugin isn't compatible with upcoming project isolation because it registers a root task depending on sub-project tasks.
Instead, a settings plugin should add an outgoing configuration by applying a project plugin to each subproject and add a root plugin consuming the configurations.

Failing output using Gradle 8.6 (or 8.7-20240205001347+0000)

- Plugin class 'org.gradle.forceresolve.ForceDependencyResolutionPlugin': Cannot access project ':day1' from project ':'
- Plugin class 'org.gradle.forceresolve.ForceDependencyResolutionPlugin': Cannot access project ':day2' from project ':'
- Plugin class 'org.gradle.forceresolve.ForceDependencyResolutionPlugin': Cannot access project ':day3' from project ':'

Sample code: https://github.com/hfhbd/advendOfCode
failing build: https://github.com/hfhbd/advendOfCode/actions/runs/7795902785/job/21259617710

@bigdaz bigdaz changed the title Support Project isolation using consumable configurations ForceDependencyResolutionPlugin incompatible with Project isolation Feb 7, 2024
@bigdaz
Copy link
Member

bigdaz commented Feb 7, 2024

Thanks for the report. It's clear that the "resolve all dependencies" task could do with some rework.

As a workaround, are you able to set -Dorg.gradle.unsafe.isolated-projects=false to disable isolated projects?

If so, I can add this as a parameter in the dependency-submission action like this, pending a proper fix in this plugin.

@hfhbd
Copy link
Author

hfhbd commented Feb 11, 2024

Sure, setting this property works: -Dorg.gradle.unsafe.isolated-projects=false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants