summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Lombardo <clombardo169@gmail.com>2023-08-21 17:31:13 -0400
committerCharles Lombardo <clombardo169@gmail.com>2023-08-21 17:31:13 -0400
commit1bc832c9b154d6732eaba2b67d6119baec5f8a83 (patch)
treead2c12f50752277ca7360a442da2cad784e38995 /src
parent062113374dc278040def62df00f5275b7c9d119a (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/android/app/build.gradle.kts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts
index 9a47e2bd8..a8db70511 100644
--- a/src/android/app/build.gradle.kts
+++ b/src/android/app/build.gradle.kts
@@ -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 {