From 6d36ba04f836f60fd9727dd88c6d673bedd5a447 Mon Sep 17 00:00:00 2001 From: Yahor Berdnikau Date: Tue, 18 Jul 2023 22:44:05 +0200 Subject: [PATCH] [Gradle] Document IncrementalSyncTask ^KT-58858 In Progress --- .../gradle/tasks/IncrementalSyncTask.kt | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/libraries/tools/kotlin-gradle-plugin-api/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/IncrementalSyncTask.kt b/libraries/tools/kotlin-gradle-plugin-api/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/IncrementalSyncTask.kt index 847afc65c0a..6066556ada9 100644 --- a/libraries/tools/kotlin-gradle-plugin-api/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/IncrementalSyncTask.kt +++ b/libraries/tools/kotlin-gradle-plugin-api/src/common/kotlin/org/jetbrains/kotlin/gradle/tasks/IncrementalSyncTask.kt @@ -7,7 +7,22 @@ import org.gradle.api.tasks.* import org.gradle.work.NormalizeLineEndings import java.io.File +/** + * A task to incrementally synchronize a set of files between directories. + * + * Incremental synchronization support greatly reduces task execution time on subsequent builds when the set of files to be synchronized is large, + * but only a small amount have changed. + */ interface IncrementalSyncTask : Task { + + /** + * The collection of paths with files to copy. + * + * Should be configured using available methods in the [ConfigurableFileCollection] + * such as [ConfigurableFileCollection.from] or [ConfigurableFileCollection.setFrom]. + * + * @see [ConfigurableFileCollection] + */ @get:InputFiles @get:NormalizeLineEndings @get:IgnoreEmptyDirectories @@ -15,9 +30,15 @@ interface IncrementalSyncTask : Task { @get:SkipWhenEmpty val from: ConfigurableFileCollection + /** + * The directory where the set of files are copied to. + */ @get:OutputDirectory val destinationDirectory: Property + /** + * @suppress + */ @get:Internal @Deprecated("Use destinationDirProperty with Provider API", ReplaceWith("destinationDirProperty.get()")) val destinationDir: File