问题描述
我正在使用 gradle 版本 7.0.0-beta01 并遵循 this guide 将 ktlint 设置到我的项目中。但是我在运行以下命令时遇到错误
./gradlew ktlintFormat
使用 -stacktrace
等运行似乎也没有多大帮助。这是我得到的错误。非常感谢任何帮助。
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
解决方法
此问题已在更高版本的 ktlint gradle 插件中修复。您可以向下到 9.2.1
或向上到 10.0.0
。 See this issue。