Skip to content

Commit 84f11b7

Browse files
committed
Remove unnecessary input-files sorting from devMavenRepositoriesInputFiles
There's no need to sort manually, the order of input files is not considered wrt up-to-date checks.
1 parent 8148aa2 commit 84f11b7

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

build-logic/src/main/kotlin/dokkabuild/DevMavenPublishExtension.kt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ package dokkabuild
55

66
import dokkabuild.utils.systemProperty
77
import org.gradle.api.file.FileCollection
8-
import org.gradle.api.provider.Provider
98
import org.gradle.api.tasks.PathSensitivity.RELATIVE
109
import org.gradle.api.tasks.testing.Test
1110
import org.gradle.process.JavaForkOptions
12-
import java.io.File
1311

1412
abstract class DevMavenPublishExtension(
1513
/**
@@ -23,7 +21,7 @@ abstract class DevMavenPublishExtension(
2321
/**
2422
* Files suitable for registering as a task input (as in, the files are reproducible-build compatible).
2523
*/
26-
private val devMavenRepositoriesInputFiles: Provider<List<File>> =
24+
private val devMavenRepositoriesInputFiles: FileCollection =
2725
devMavenRepositories
2826
// Convert to a FileTree, which converts directories to all files, so we can filter on specific files.
2927
.asFileTree
@@ -32,10 +30,6 @@ abstract class DevMavenPublishExtension(
3230
// The Gradle Module Metadata contains the same information (and more),
3331
// so the Maven metadata is redundant.
3432
.matching { exclude("**/maven-metadata*.xml") }
35-
// FileTrees have an unstable order (even on the same machine), which means Gradle up-to-date checks fail.
36-
// So, manually sort the files so that Gradle can cache the task.
37-
.elements
38-
.map { files -> files.map { it.asFile }.sorted() }
3933

4034
/**
4135
* Configures [Test] task to register [devMavenRepositories] as a task input,

0 commit comments

Comments
 (0)