[Gradle] Remove up-to-date checks in CleanNativeDistributionCommonizer

Gradle doesn't track removed files in OutputDirectory after task
execution. So if task removed some files and if these files
are added back the task would be still UP-TO-DATE. Which is incorrect.

Executing clean task on empty directory is the same as check that
directory is empty. Therefore, this up-to-date check can be removed.

^KT-62611 Verification Pending
This commit is contained in:
Anton Lakotka
2023-10-15 22:50:19 +02:00
committed by Space Team
parent 16c17d3c22
commit 657dd31493
@@ -10,7 +10,7 @@ import org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.api.file.FileSystemOperations
import org.gradle.api.provider.Property
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.TaskAction
import org.gradle.api.tasks.TaskProvider
import org.gradle.work.DisableCachingByDefault
@@ -175,7 +175,7 @@ internal abstract class CleanNativeDistributionCommonizerTask : DefaultTask() {
@get:Inject
abstract val fileSystemOperations: FileSystemOperations
@get:OutputDirectory
@get:Internal
abstract val commonizerDirectory: Property<File>
@TaskAction