[Gradle] Pass lambda directly to project.files instead of wrapping it

with project.provider(). This prevents from extra evaluation during task
execution. And makes tasks compatible with configuration cache
This commit is contained in:
Anton Lakotka
2023-01-16 20:49:38 +01:00
committed by Space Team
parent 1ba199761c
commit 608760e32b
@@ -112,7 +112,7 @@ internal fun Project.filesProvider(
vararg buildDependencies: Any,
provider: () -> Any
): ConfigurableFileCollection {
return project.files(project.provider(provider)).builtBy(*buildDependencies)
return project.files(provider).builtBy(*buildDependencies)
}
internal fun <T : Task> T.outputFilesProvider(provider: T.() -> Any): ConfigurableFileCollection {