Sineaggi commented on code in PR #3614:
URL: https://github.com/apache/avro/pull/3614#discussion_r2662094726


##########
lang/java/gradle-plugin/src/main/kotlin/eu/eventloopsoftware/avro/gradle/plugin/tasks/CompileSchemaTask.kt:
##########
@@ -0,0 +1,125 @@
+package eu.eventloopsoftware.avro.gradle.plugin.tasks
+
+import org.apache.avro.SchemaParseException
+import org.apache.avro.SchemaParser
+import org.apache.avro.compiler.specific.SpecificCompiler
+import org.apache.avro.compiler.specific.SpecificCompiler.FieldVisibility
+import org.apache.avro.generic.GenericData
+import org.gradle.api.file.FileTree
+import org.gradle.api.provider.Property
+import org.gradle.api.tasks.TaskAction
+import java.io.File
+import java.io.IOException
+import java.util.*
+
+abstract class CompileSchemaTask : AbstractCompileTask() {
+
+    @TaskAction
+    fun compileSchema() {
+        project.logger.info("Generating Java files from Avro schemas...")
+
+        if (!source.isEmpty) {

Review Comment:
   If something like `DirectoryProperty` is used in conjunction with 
@[SkipWhenEmpty](https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/SkipWhenEmpty.html)
 , a task state of NO_SOURCE should be used when no sources are available.



-- 
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