I am observing following error after updating grad...
# detekt
m
I am observing following error after updating gradle in the project to 7.X
Copy code
A problem occurred evaluating script.
> Failed to apply plugin 'io.gitlab.arturbosch.detekt'.
   > Cannot run Project.afterEvaluate(Action) when the project is already evaluated.
The thing is I have multiple modules and I am applying detekt to all of them just by
Copy code
allprojects {
  apply from: "$rootDir/detekt.gradle"
}
in the root project. This was working so far. Is there a remedy for that or it needs to be fixed in Detekt gradle plugin?
g
So the problem is most likely related to using an external gradle file (the
detekt.gradle
). Those files don’t really work well imho. Please take a look at my comment here: https://github.com/detekt/detekt/issues/3490#issuecomment-895543558 I would advice you switch to using a precompiled script plugin or so.
m
thx, indeed precompiled script plugin seems to work just fine
g
👍
167 Views