KtLint Execution failed for task ':app:ktlintAndroidTestDebugSourceSetCheck'

5.8k Views Asked by At

I am using gradle version 7.0.0-beta01 and following this guide to setup KtLint to my project. But I am facing error while running following command

./gradlew ktlintFormat

Running with -stacktrace etc also doesn't seem to help much. Here is the error I am getting. Any help is much appreciated.

Execution failed for task ':app:ktlintAndroidTestDebugSourceSetFormat'.
> Querying the mapped value of task ':app:ktlintAndroidTestDebugSourceSetFormat' property 'reporterOutputDir' before task ':app:ktlintAndroidTestDebugSourceSetFormat' has completed is not supported
2

There are 2 best solutions below

0
On

This was fixed in a later version of the ktlint gradle plugin. You can go down to 9.2.1 or up to 10.0.0. See this issue.

0
On

Updating to latest version of ktlint should be the solution to this issues for compatability