Skip to content
Snippets Groups Projects
Commit 1bc832c9 authored by Charles Lombardo's avatar Charles Lombardo
Browse files

android: lint: Delete generated ktlint folder between builds

There's a bug in ktlint where it will run into an error if you build the project, delete a source file, and then build again. It will be unable to find the file you deleted and can't recover until these files are deleted. This just deletes those files before every run.
parent 06211337
No related branches found
No related tags found
No related merge requests found
......@@ -160,6 +160,11 @@ android {
}
}
tasks.create<Delete>("ktlintReset") {
delete(File(buildDir.path + File.separator + "intermediates/ktLint"))
}
tasks.getByPath("loadKtlintReporters").dependsOn("ktlintReset")
tasks.getByPath("preBuild").dependsOn("ktlintCheck")
ktlint {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment