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

GradleFx is incompatible with gradle 6.x #259

Open
bighenry opened this issue Feb 29, 2020 · 3 comments
Open

GradleFx is incompatible with gradle 6.x #259

bighenry opened this issue Feb 29, 2020 · 3 comments

Comments

@bighenry
Copy link

The following errors are returned on use following an upgrade from gradle 5.x to 6.x:

> Failed to notify project evaluation listener.
   > Removing tasks from the task container is not supported.  Disable the tasks or use replace() instead.
   > Removing tasks from the task container is not supported.  Disable the tasks or use replace() instead.
   > Removing tasks from the task container is not supported.  Disable the tasks or use replace() instead.
   > Removing tasks from the task container is not supported.  Disable the tasks or use replace() instead.
   > Removing tasks from the task container is not supported.  Disable the tasks or use replace() instead.
   > Removing tasks from the task container is not supported.  Disable the tasks or use replace() instead.
   > Removing tasks from the task container is not supported.  Disable the tasks or use replace() instead.
   > Removing tasks from the task container is not supported.  Disable the tasks or use replace() instead.
   > Removing tasks from the task container is not supported.  Disable the tasks or use replace() instead.
   > Removing tasks from the task container is not supported.  Disable the tasks or use replace() instead.
   > Removing tasks from the task container is not supported.  Disable the tasks or use replace() instead.

This appears to be caused by the task removal code in: src/main/groovy/org/gradlefx/plugins/AbstractGradleFxPlugin.groovy :

 protected Task addTask(String name, Class taskClass, Closure condition) {
        //always add tasks to make sure they are immediately on the task graph,
        //but remove them after evaluation if it turns out we don't need them
        Task task = project.tasks.create name, taskClass

        project.afterEvaluate {
            if (!condition()) project.tasks.remove task
        }

        return task
    }
@bighenry
Copy link
Author

Opened PR to address: #260

@SlevinBE
Copy link
Member

SlevinBE commented Mar 8, 2020

Thanks for the PR! I'll try to handle it in the coming week.

@najamm
Copy link

najamm commented Jul 27, 2021

@SlevinBE will you be merging this PR and creating a release?

Thanks!

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

No branches or pull requests

3 participants