Skip to content

ForceDependencyResolutionPlugin incompatible with Project isolation #109

Open

Description

@hfhbd

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

Activity

  1. changed the title [-]Support Project isolation using consumable configurations [/-] [+]`ForceDependencyResolutionPlugin` incompatible with Project isolation[/+] on Feb 7, 2024
  2. bigdaz commented on Feb 7, 2024

    @bigdaz
    Member

    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.

  3. hfhbd commented on Feb 11, 2024

    @hfhbd
    Author

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

  4. reopened this on Feb 25, 2024
  5. eygraber commented on Jul 29, 2026

    @eygraber

    Any plans to address this now that Gradle 9.7 is graduating project isolation to incubating?

  6. bigdaz commented on Jul 31, 2026

    @bigdaz
    Member

    Any plans to address this now that Gradle 9.7 is graduating project isolation to incubating?

    No concrete plans, no. Currently, this plugin requires -Dorg.gradle.isolated-projects=false for recent Gradle versions and -Dorg.gradle.unsafe.isolated-projects=false for older versions.

    I will update the gradle/actions/dependency-submission action to set this value correctly for all Gradle versions.

    Contributions to make the plugin compatible with isolated projects would be welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions