Skip to content

Commit 1dabd28

Browse files
committed
Disable Configuration Cache in generated pre-commit Gradle call
internalKtlintGitFilter is part of the cache key, and it changes with every commit, so getting a cache hit is extremely unlikely.
1 parent c4d1d9c commit 1dabd28

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
77

88
## [Unreleased]
99

10+
- Disable Configuration Cache in generated pre-commit Gradle call [#995](https://github.com/JLLeitschuh/ktlint-gradle/pull/995)
1011
- Update build to work with gradle 9.1 and Java 25 [#962](https://github.com/JLLeitschuh/ktlint-gradle/pull/962)
1112
- Collapse sourcesets to simply build [#964](https://github.com/JLLeitschuh/ktlint-gradle/pull/964)
1213

plugin/src/main/kotlin/org/jlleitschuh/gradle/ktlint/GitHook.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ private fun generateGradleCommand(
3636
} else {
3737
"./gradlew"
3838
}
39-
return "$gradleCommand --quiet $taskName -P$FILTER_INCLUDE_PROPERTY_NAME=\"${'$'}CHANGED_FILES\""
39+
return "$gradleCommand --quiet --no-configuration-cache $taskName -P$FILTER_INCLUDE_PROPERTY_NAME=\"${'$'}CHANGED_FILES\""
4040
}
4141

4242
private fun generateGitCommand(

0 commit comments

Comments
 (0)