Skip to content

Commit d8271ab

Browse files
committed
Update tasks
- SyncFile is no longer cachable - removed KotlinApiCompareTask's ctor
1 parent cd2a320 commit d8271ab

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/main/kotlin/KotlinApiCompareTask.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import org.gradle.api.file.RegularFileProperty
1414
import org.gradle.api.tasks.*
1515

1616
@CacheableTask
17-
public open class KotlinApiCompareTask @Inject constructor() : DefaultTask() {
17+
public open class KotlinApiCompareTask : DefaultTask() {
1818

1919
@get:InputFiles // don't fail the task if file does not exist, instead print custom error message from verify()
2020
@get:PathSensitive(PathSensitivity.RELATIVE)

src/main/kotlin/SyncFile.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ package kotlinx.validation
88
import org.gradle.api.DefaultTask
99
import org.gradle.api.file.RegularFileProperty
1010
import org.gradle.api.tasks.*
11+
import org.gradle.work.DisableCachingByDefault
1112
import java.nio.file.Files
1213
import java.nio.file.StandardCopyOption
1314

1415
// Built-in Gradle's Copy/Sync tasks accepts only a destination directory (not a single file)
1516
// and registers it as an output dependency. If there's another task reading from that particular
1617
// directory or writing into it, their input/output dependencies would clash and as long as
1718
// there will be no explicit ordering or dependencies between these tasks, Gradle would be unhappy.
18-
@CacheableTask
19+
@DisableCachingByDefault(because = "No computations, only copying files")
1920
internal abstract class SyncFile : DefaultTask() {
2021
@get:InputFiles
2122
@get:PathSensitive(PathSensitivity.RELATIVE)

0 commit comments

Comments
 (0)