snazy commented on code in PR #2907:
URL: https://github.com/apache/polaris/pull/2907#discussion_r2477128954


##########
build-logic/src/main/kotlin/publishing/digest-task.kt:
##########
@@ -19,40 +19,52 @@
 
 package publishing
 
+import java.io.File
 import java.security.MessageDigest
 import javax.inject.Inject
 import org.gradle.api.DefaultTask
+import org.gradle.api.Project
 import org.gradle.api.model.ObjectFactory
 import org.gradle.api.tasks.Input
-import org.gradle.api.tasks.InputFile
-import org.gradle.api.tasks.OutputFile
+import org.gradle.api.tasks.InputFiles
+import org.gradle.api.tasks.OutputFiles
 import org.gradle.api.tasks.TaskAction
+import org.gradle.api.tasks.TaskProvider
+import org.gradle.internal.extensions.stdlib.capitalized
 import org.gradle.work.DisableCachingByDefault
 
 @DisableCachingByDefault
 abstract class GenerateDigest @Inject constructor(objectFactory: 
ObjectFactory) : DefaultTask() {
 
-  @get:InputFile val file = objectFactory.fileProperty()
+  @get:InputFiles val files = objectFactory.fileCollection()
+
   @get:Input val algorithm = 
objectFactory.property(String::class.java).convention("SHA-512")
-  @get:OutputFile
-  val outputFile =
-    objectFactory.fileProperty().convention {
-      val input = file.get().asFile
-      val algo = algorithm.get()
-      input.parentFile.resolve("${input.name}.${algo.replace("-", 
"").lowercase()}")
-    }
+
+  @Suppress("unused", "UnstableApiUsage")
+  @get:OutputFiles
+  val outputFiles =

Review Comment:
   declaring the output artifacts of the task 
(https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/OutputFiles.html)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to