frevib commented on code in PR #3614:
URL: https://github.com/apache/avro/pull/3614#discussion_r2665940504
##########
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:
Compilation fails if we don't use that line. `Unresolved reference
'SomeGeneratedClass`.
I've used your method of adding sources:
https://github.com/apache/avro/pull/3614/files#diff-02e299025197282b1f1fec4a0fe89c1fb47606fcd9a2b0fc55206ca1ae8f511dR75
--
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]