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


##########
lang/java/gradle-plugin/README.md:
##########
@@ -0,0 +1,72 @@
+# Avro Gradle plugin (in development)
+
+Gradle plugin that generates Java code from Avro schemas
+
+## Usage
+
+### Add avro extension
+In `build.gradle.kts`:
+
+### Add plugin
+
+```kotlin
+plugins {
+    id("eu.eventloopsoftware.avro-gradle-plugin") version "0.0.2"
+}
+```
+### Add Avro dependency
+
+```kotlin
+implementation("org.apache.avro:avro:1.12.1")
+```
+
+### Configure Avro Gradle plugin
+
+```kotlin
+avro {
+    sourceDirectory = "src/main/avro"
+    // All properties are available in `GradlePluginExtension.kt`
+} 
+```
+
+### Configure Maven dependency repository
+In `settings.gradle.kts`:
+
+Plugin is published on Maven Central:
+```kotlin
+pluginManagement {
+    repositories {
+        mavenCentral()
+        gradlePluginPortal()
+    }
+}
+```
+
+### Add a task hook
+For Intellij to recognize the newly generated Java files add this to 
`build.gradle.kts`:
+
+```kotlin
+tasks.named("compileKotlin") { 
dependsOn(tasks.named("avroGenerateJavaClasses")) }

Review Comment:
   This is the jank that can be avoided by setting the srcDir using the task to 
avoid requiring dependsOn fixes 
https://github.com/apache/avro/pull/3614/changes#r2662114325



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