Skip to content

Commit 9c5040e

Browse files
committed
PR Comments
1 parent 7f9c1db commit 9c5040e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

affectedmoduledetector/src/main/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleDetectorPlugin.kt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ class AffectedModuleDetectorPlugin : Plugin<Project> {
9696
val task = rootProject.tasks.register(taskType.commandByImpact).get()
9797
task.group = CUSTOM_TASK_GROUP_NAME
9898
task.description = taskType.taskDescription
99+
disableConfigCache(task)
99100

100101
rootProject.subprojects { project ->
101102
pluginIds.forEach { pluginId ->
@@ -136,9 +137,7 @@ class AffectedModuleDetectorPlugin : Plugin<Project> {
136137
val task = rootProject.tasks.register(taskType.commandByImpact).get()
137138
task.group = groupName
138139
task.description = taskType.taskDescription
139-
if (GradleVersion.current() >= GradleVersion.version("7.4")) {
140-
task.notCompatibleWithConfigurationCache("AMD requires knowledge of what has changed in the file system so we can not cache those values (https://github.com/dropbox/AffectedModuleDetector/issues/150)")
141-
}
140+
disableConfigCache(task)
142141

143142
rootProject.subprojects { project ->
144143
project.afterEvaluate {
@@ -155,6 +154,12 @@ class AffectedModuleDetectorPlugin : Plugin<Project> {
155154
}
156155
}
157156

157+
private fun disableConfigCache(task: Task) {
158+
if (GradleVersion.current() >= GradleVersion.version("7.4")) {
159+
task.notCompatibleWithConfigurationCache("AMD requires knowledge of what has changed in the file system so we can not cache those values (https://github.com/dropbox/AffectedModuleDetector/issues/150)")
160+
}
161+
}
162+
158163
private fun withPlugin(
159164
pluginId: String,
160165
task: Task,

0 commit comments

Comments
 (0)