Hi, I tried to move my build to gradle 2.4, and I get the following error when I try to run any task:
Cannot add Mutate rule 'org.gradle.language.base.plugins.ComponentModelBasePlugin$Rules#closeSourcesForBinaries(org.gradle.platform.base.BinaryContainer, org.gradle.language.base.ProjectSourceSet)' for model element 'binaries' when element is in state GraphClosed.
It happens when it parses the part related to the build of a C program, which is in a separate file. If I comment the binaries.all section nothing changes. Do you know what that error means?
The offending file is something like this:
The error is coming out of the native component plugin (that’s used by the ‘c’ plugin). It has something to do with Gradle thinking that the ‘binaries’ container has been configured and something is trying to add another bit of code that will modify the binaries container again.
This seems to work for me by itself (just what you’ve posted), what’s happening before the c related parts and are there any other plugins applied?
I import that file in build.gradle using "apply from:…"
If I move it at the beginning of the file the C part works, but I get weird errors during compileGroovy