{"id":127701,"date":"2024-10-25T17:46:00","date_gmt":"2024-10-25T14:46:00","guid":{"rendered":"https:\/\/www.javacodegeeks.com\/?p=127701"},"modified":"2024-10-22T15:39:05","modified_gmt":"2024-10-22T12:39:05","slug":"generate-java-classes-from-avro-schemas-using-gradle","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/generate-java-classes-from-avro-schemas-using-gradle.html","title":{"rendered":"Generate Java Classes From Avro Schemas Using Gradle"},"content":{"rendered":"<p>In this tutorial, we\u2019ll learn how to generate Java classes from an Apache Avro schema.First, we\u2019ll familiarize ourselves with two methods: using the existing Gradle&nbsp;plugin and implementing a custom task for the build script. Then, we\u2019ll identify the pros and cons of each approach and understand which scenarios they fit best.<\/p>\n<h2 class=\"wp-block-heading\">1. Introduction<\/h2>\n<p>Generating Java classes from Avro schemas using Gradle streamlines the process of integrating data serialization within Java projects. By leveraging Avro schemas, developers can define their data structures in a concise, language-agnostic format. Gradle, a powerful build automation tool, simplifies the conversion of these schemas into Java classes, ensuring seamless serialization and deserialization. This integration not only enhances efficiency but also maintains consistency across various services and applications, making it an essential skill for Java developers working with data-intensive systems.<\/p>\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2024\/10\/avro.png\"><img decoding=\"async\" width=\"820\" height=\"550\" src=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2024\/10\/avro.png\" alt=\"\" class=\"wp-image-127754\" style=\"width:840px;height:auto\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2024\/10\/avro.png 820w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2024\/10\/avro-300x201.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2024\/10\/avro-768x515.png 768w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/a><figcaption class=\"wp-element-caption\">Generating Java Classes from Avro Schemas<\/figcaption><\/figure>\n<p>Generating Java classes from Avro schemas using Gradle starts with defining your Avro schema in a &#8216;.avsc&#8217; file. This file specifies your data&#8217;s structure. Next, set up your Gradle project and include the necessary dependencies, such as the &#8216;avro-gradle-plugin&#8217;. You then configure the plugin in your &#8216;build.gradle&#8217; file, pointing to the schema file and specifying the output directory for the generated Java classes. Running the Gradle build task will now generate Java classes from the Avro schema, allowing for seamless data serialization and deserialization in your Java projects. Simple, efficient, and effective!<\/p>\n<h2 class=\"wp-block-heading\">2. Getting Started With Apache Avro<\/h2>\n<p>Apache Avro is a data serialization framework that facilitates efficient data exchange between systems using different languages. It uses JSON to define data schemas, making it easy to understand and manipulate. Avro supports schema evolution, meaning older schemas can read data written with newer versions and vice versa. This compatibility ensures smooth data communication and integration across distributed systems. Avro\u2019s compact, binary data format enhances performance and reduces storage requirements, making it an ideal choice for big data applications and systems where bandwidth and storage efficiency are critical. You need to have Java installed. You can use jdk 1.8 and set JAVA_HOME to the installed JDK.<\/p>\n<h3 class=\"wp-block-heading\">2.1 Gradle Setup<\/h3>\n<p>You can <a href=\"https:\/\/gradle.org\/install\/\">download<\/a> or setup the gradle. Gradle command for setup  is :<\/p>\n<pre class=\"brush:bash\"> \n$ mkdir \/opt\/gradle\n$ unzip -d \/opt\/gradle gradle-8.10.2-bin.zip\n$ ls \/opt\/gradle\/gradle-8.10.2\n\n<\/pre>\n<p>After setting up, you can run the gradle command to check the version. Gradle command is shown below:<\/p>\n<pre class=\"brush:bash\"> \ngradle -v\n<\/pre>\n<p>The output of the executed command is shown below:<\/p>\n<pre class=\"brush:bash\"> \nbhagvanarch@Bhagvans-MacBook-Air avro_oct_20 % gradle -v          \n\n------------------------------------------------------------\nGradle 8.10.2\n------------------------------------------------------------\n\nBuild time:    2024-09-23 21:28:39 UTC\nRevision:      415adb9e06a516c44b391edff552fd42139443f7\n\nKotlin:        1.9.24\nGroovy:        3.0.22\nAnt:           Apache Ant(TM) version 1.10.14 compiled on August 16 2023\nLauncher JVM:  23 (Homebrew 23)\nDaemon JVM:    \/opt\/homebrew\/Cellar\/openjdk\/23\/libexec\/openjdk.jdk\/Contents\/Home (no JDK specified, using current Java home)\nOS:            Mac OS X 14.6.1 aarch64\n\nbhagvanarch@Bhagvans-MacBook-Air avro_oct_20 %\n<\/pre>\n<h2 class=\"wp-block-heading\">3. Java Classes Generation<\/h2>\n<p>Apache Avro is a widely used data serialization framework that efficiently stores and exchanges large datasets across diverse programming languages. It&#8217;s trendy in big data ecosystems, often seen in conjunction with Hadoop and Kafka. One of the key features of Avro is its ability to define schemas in JSON format, which makes it both human-readable and machine-processable. Avro schemas ensure that the data structure is clearly defined, facilitating smooth data communication between services.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>At its core, Avro provides a compact and fast binary data format that reduces storage overhead and accelerates data processing. It uses JSON to define the data structure, known as a schema, and supports schema evolution, allowing systems to handle data encoded with older versions of the schema. This feature is crucial for maintaining compatibility in distributed systems where updating all components simultaneously is impractical.<\/p>\n<p>Generating Java classes from Avro schemas automates the serialization and deserialization process, providing a type-safe way to handle data. This not only speeds up development but also reduces errors associated with manual serialization. Avro&#8217;s binary format ensures that the data is both compact and easy to process, making it ideal for high-performance applications.<\/p>\n<h3 class=\"wp-block-heading\">3.1 Steps to Generate Java Classes Using Apache Avro<\/h3>\n<h4 class=\"wp-block-heading\">3.1.1 Define the Avro Schema<\/h4>\n<p>The first step is to define your Avro schema in a  &#8216;.avsc&#8217; file. This file is written in JSON and specifies the structure of the data, including the fields and their data types. Here&#8217;s an example of an Avro schema for a simple user record. Let us look at the JSON file:<\/p>\n<pre class=\"brush:xml\">\n{\n  \"namespace\": \"org.javacodegeeks\",\n\u00a0 \"type\": \"record\",\n\n\u00a0 \"name\": \"User\",\n\n\u00a0 \"namespace\": \"com.example\",\n\n\u00a0 \"fields\": [\n\n\u00a0\u00a0\u00a0 {\"name\": \"id\", \"type\": \"int\"},\n\n\u00a0\u00a0\u00a0 {\"name\": \"name\", \"type\": \"string\"},\n\n\u00a0\u00a0\u00a0 {\"name\": \"email\", \"type\": [\"null\", \"string\"], \"default\": null}\n\n\u00a0 ]\n\n}\n\n\n<\/pre>\n<p>In this schema, we define a  &#8216;User&#8217; record with three fields:  &#8216;id&#8217;, &#8216;name&#8217;, and &#8217;email&#8217;. The &#8217;email&#8217; field is nullable, indicated by the union type &#8216;[&#8220;null&#8221;, &#8220;string&#8221;]&#8217;.<\/p>\n<h4 class=\"wp-block-heading\">3.1.2 \u00a0Install Apache Avro Tools<\/h4>\n<p>Next, you need to install the Apache Avro tools. These tools include a compiler that generates Java classes from Avro schemas. You can download the Avro tools JAR file from the official Apache Avro website or add it to your build configuration if you&#8217;re using a build tool like Gradle or Maven.<\/p>\n<p>For Gradle, add the following dependency to your &#8216;build.gradle&#8217; file: <\/p>\n<pre class=\"brush:bash\"> \nbuildscript {\n    dependencies {\n        classpath libs.avro.tools\n    }\n}\n\nplugins {\n    id 'java'\n    alias libs.plugins.avro\n}\n\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    implementation libs.avro\n    \/\/ Use JUnit Jupiter for testing.\n    testImplementation libs.junit.jupiter\n\n    testRuntimeOnly 'org.junit.platform:junit-platform-launcher'\n\n}\n\n<\/pre>\n<p><strong>&nbsp;<\/strong>Update your libs.toml file which is found under gradle folder.<\/p>\n<pre class=\"brush:bash\"> \n# This file was generated by the Gradle 'init' task.\n# https:\/\/docs.gradle.org\/current\/userguide\/platforms.html#sub::toml-dependencies-format\n\n[versions]\njunit-jupiter = \"5.10.0\"\navro = \"1.11.0\"\n\n[libraries]\njunit-jupiter = { module = \"org.junit.jupiter:junit-jupiter\", version.ref = \"junit-jupiter\" }\navro = {module = \"org.apache.avro:avro\", version.ref = \"avro\"}\navro-tools = {module = \"org.apache.avro:avro-tools\", version.ref = \"avro\"}\n\n[plugins]\navro = { id = \"com.github.davidmc24.gradle.plugin.avro\", version = \"1.9.1\" }\n\n\n<\/pre>\n<h4 class=\"wp-block-heading\">3.1.3 Generate Java Classes<\/h4>\n<p><strong>Avro Tools<\/strong><\/p>\n<p>With the schema defined and the Avro tools installed, you can now generate the Java classes. This can be done using the Avro tools command-line interface or through your build tool.<\/p>\n<p>For command-line usage, run the following command:<\/p>\n<pre class=\"brush:bash\"> \njava -jar avro-tools-1.10.2.jar compile schema user.avsc .\n<\/pre>\n<p>This command tells the Avro compiler to generate Java classes from the &#8216;user.avsc&#8217; file and place them in the current directory.<\/p>\n<p><strong>Gradle<\/strong><\/p>\n<p>If you&#8217;re using Gradle, you can run the build task<\/p>\n<pre class=\"brush:bash\"> \n.\/gradlew build\n<\/pre>\n<p>Running &#8216;.\/gradlew build&#8217; will then generate the Java classes. You can find them under build\/<em>generated-main-avro-java<\/em><\/p>\n<h4 class=\"wp-block-heading\">3.1.4 \u00a0Implement Serialization and Deserialization<\/h4>\n<p>Once the Java classes are generated, you can use them to serialize and deserialize data. Avro provides specific classes to handle these operations, such as &#8216;DatumWriter&#8217; and &#8216;DatumReader&#8217; because some times we need to read and write data.<\/p>\n<p>Here&#8217;s an example of how to serialize a &#8216;User&#8217; object to a file:<\/p>\n<pre class=\"brush:java\"> \nimport org.apache.avro.file.DataFileWriter;\n\nimport org.apache.avro.generic.GenericDatumWriter;\n\nimport org.apache.avro.specific.SpecificDatumWriter;\n\nimport org.javacodegeeks.User;\n\npublic class AvroWriterExample {\n\n\u00a0\u00a0\u00a0 public static void main(String[] args) {\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 User user = new User();\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 user.setId(1);\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 user.setName(\"John Doe\");\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 user.setEmail(\"john.doe@example.com\");\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 DatumWriter userDatumWriter = new SpecificDatumWriter(User.class);\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 try (DataFileWriter dataFileWriter = new DataFileWriter(userDatumWriter)) {\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 dataFileWriter.create(user.getSchema(), new File(\"users.avro\"));\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 dataFileWriter.append(user);\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 } catch (IOException e) {\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 e.printStackTrace();\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\n\n\u00a0\u00a0\u00a0 }\n\n}\n<\/pre>\n<p>Please ensure you have the jars (avro and avro tools) downloaded.This example can be compiled and executed as below:<\/p>\n<pre class=\"brush:bash\"> \n  javac -cp \".\/*\" AvroWriterExample.java\n java -classpath '.:.\/*' AvroWriterExample\n\n<\/pre>\n<p>In the above writer example, we create a &#8216;User&#8217; object and serialize it to a file named &#8216;users.avro&#8217;.<\/p>\n<p>To deserialize the data, you can use the &#8216;DatumReader&#8217; class because some times you need to read data:<\/p>\n<pre class=\"brush:java\"> \nimport org.apache.avro.file.DataFileReader;\n\nimport org.apache.avro.generic.GenericDatumReader;\n\nimport org.apache.avro.io.DatumReader;\n\nimport org.apache.avro.specific.SpecificDatumReader;\n\nimport org.javacodegeeks.avro.User;\n\nimport java.io.*;\n\npublic class AvroReaderExample {\n\n public static void main(String[] args) {\n\n File file = new File(\"users.avro\");\n\n DatumReader userDatumReader = new SpecificDatumReader(User.class);\n\n try (DataFileReader dataFileReader = new DataFileReader(file, userDatumReader)) {\n\n User user = null;\n\n while (dataFileReader.hasNext()) {\n\n user  = dataFileReader.next(user);\n\n System.out.println(user);\n\n }\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n }\n\n }\n}\n<\/pre>\n<p>This code reads the &#8216;users.avro&#8217; file and prints each &#8216;User&#8217; object to the console when the code is executed using the commands below.<\/p>\n<pre class=\"brush:bash\"> \n  javac -cp \".\/*\" AvroReaderExample.java\n java -classpath '.:.\/*' AvroReaderExample\n\n<\/pre>\n<p>The output of the executed code above is shown below:<\/p>\n<pre class=\"brush:bash\"> \nbhagvanarch@Bhagvans-MacBook-Air avro_example_oct_20 % java -classpath '.:.\/*' AvroReaderExample\n{\"id\": 1, \"name\": \"John Doe\", \"email\": \"john.doe@example.com\"}\nbhagvanarch@Bhagvans-MacBook-Air avro_example_oct_20 % \n\n<\/pre>\n<h4 class=\"wp-block-heading\">3.1.5 \u00a0Schema Evolution and Compatibility<\/h4>\n<p>One of the powerful features of Avro is schema evolution, which allows for backward and forward compatibility when schemas change over time. This means you can add new fields, remove fields, or change field types without breaking existing data.<\/p>\n<p>For example, if you add a new field to the &#8216;User&#8217; schema then you can  modify the object definition:<\/p>\n<pre class=\"brush:xml\">\n{\n\n\u00a0 \"type\": \"record\",\n\n\u00a0 \"name\": \"User\",\n\n\u00a0 \"namespace\": \"com.example\",\n\n\u00a0 \"fields\": [\n\n\u00a0\u00a0\u00a0 {\"name\": \"id\", \"type\": \"int\"},\n\n\u00a0\u00a0\u00a0 {\"name\": \"name\", \"type\": \"string\"},\n\n\u00a0\u00a0\u00a0 {\"name\": \"email\", \"type\": [\"null\", \"string\"], \"default\": null},\n\n\u00a0\u00a0\u00a0 {\"name\": \"phone\", \"type\": [\"null\", \"string\"], \"default\": null}\n\n\u00a0 ]\n\n}\n\n<\/pre>\n<p>This new schema is still compatible with data written using the old schema because Avro supports default values for new fields.<\/p>\n<p>Generating Java classes from Avro schemas is a straightforward process that enhances the efficiency and reliability of data serialization in Java applications. By defining your data structure in a schema, using the Avro tools to generate classes, and implementing serialization and deserialization logic, you can seamlessly integrate Avro into your projects. The ability to evolve schemas without breaking compatibility makes Avro a robust choice for applications that require flexible and efficient data handling without the overhead of roundtrip engineering.<\/p>\n<h2 class=\"wp-block-heading\">5. Conclusion<\/h2>\n<p>In conclusion, generating Java classes from Avro schemas using Gradle provides a seamless and efficient workflow for integrating Avro serialization into your Java projects. By defining your data structures in Avro schema files and leveraging Gradle\u2019s build automation capabilities, you streamline the process of generating the necessary Java classes.<\/p>\n<p>This approach enhances development speed and ensures type safety and consistency across your application. Furthermore, the ease of updating schemas and regenerating classes means you can adapt to evolving data requirements without significant overhead. Embracing this methodology equips you with a robust solution for handling data serialization in a scalable and maintainable manner, ultimately contributing to more efficient and reliable software development.<\/p>\n<h2 class=\"wp-block-heading\">6. Download<\/h2>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <a href=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2024\/10\/avro_example_oct_20.zip\"><strong>Generate Java Classes From Avro Schemas Using Gradle<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we\u2019ll learn how to generate Java classes from an Apache Avro schema.First, we\u2019ll familiarize ourselves with two methods: using the existing Gradle&nbsp;plugin and implementing a custom task for the build script. Then, we\u2019ll identify the pros and cons of each approach and understand which scenarios they fit best. 1. Introduction Generating Java &hellip;<\/p>\n","protected":false},"author":82890,"featured_media":129,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,6],"tags":[3124,484],"class_list":["post-127701","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","category-java","tag-avro","tag-gradle"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Generate Java Classes From Avro Schemas Using Gradle - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"java gradle avro schema\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/generate-java-classes-from-avro-schemas-using-gradle.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Generate Java Classes From Avro Schemas Using Gradle - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"java gradle avro schema\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/generate-java-classes-from-avro-schemas-using-gradle.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/bhagvank\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-25T14:46:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/gradle-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Bhagvan Kommadi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bhaggu\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bhagvan Kommadi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/generate-java-classes-from-avro-schemas-using-gradle.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/generate-java-classes-from-avro-schemas-using-gradle.html\"},\"author\":{\"name\":\"Bhagvan Kommadi\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/9caeec0195d2f7a298d4af138dcd90f3\"},\"headline\":\"Generate Java Classes From Avro Schemas Using Gradle\",\"datePublished\":\"2024-10-25T14:46:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/generate-java-classes-from-avro-schemas-using-gradle.html\"},\"wordCount\":1303,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/generate-java-classes-from-avro-schemas-using-gradle.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/gradle-logo.jpg\",\"keywords\":[\"avro\",\"Gradle\"],\"articleSection\":[\"Enterprise Java\",\"Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/generate-java-classes-from-avro-schemas-using-gradle.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/generate-java-classes-from-avro-schemas-using-gradle.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/generate-java-classes-from-avro-schemas-using-gradle.html\",\"name\":\"Generate Java Classes From Avro Schemas Using Gradle - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/generate-java-classes-from-avro-schemas-using-gradle.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/generate-java-classes-from-avro-schemas-using-gradle.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/gradle-logo.jpg\",\"datePublished\":\"2024-10-25T14:46:00+00:00\",\"description\":\"java gradle avro schema\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/generate-java-classes-from-avro-schemas-using-gradle.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/generate-java-classes-from-avro-schemas-using-gradle.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/generate-java-classes-from-avro-schemas-using-gradle.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/gradle-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/gradle-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/generate-java-classes-from-avro-schemas-using-gradle.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Generate Java Classes From Avro Schemas Using Gradle\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/9caeec0195d2f7a298d4af138dcd90f3\",\"name\":\"Bhagvan Kommadi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a98c5590df009be2bee75469ecbeef476c2167aae277ac576f89119b021d8e2d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a98c5590df009be2bee75469ecbeef476c2167aae277ac576f89119b021d8e2d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a98c5590df009be2bee75469ecbeef476c2167aae277ac576f89119b021d8e2d?s=96&d=mm&r=g\",\"caption\":\"Bhagvan Kommadi\"},\"description\":\"Bhagvan Kommadi is the Founder of Architect Corner &amp; has around 19 years experience in the industry, ranging from large scale enterprise development to helping incubate software product start-ups. He has done Masters in Industrial Systems Engineering at Georgia Institute of Technology (1997) and Bachelors in Aerospace Engineering from Indian Institute of Technology, Madras (1993). He is member of IFX forum,Oracle JCP and participant in Java Community Process. He founded Quantica Computacao, the first quantum computing startup in India. Markets and Markets have positioned Quantica Computacao in \u2018Emerging Companies\u2019 section of Quantum Computing quadrants. Bhagvan has engineered and developed simulators and tools in the area of quantum technology using IBM Q, Microsoft Q# and Google QScript.\",\"sameAs\":[\"http:\\\/\\\/www.architectcorner.com\",\"https:\\\/\\\/www.facebook.com\\\/bhagvank\",\"https:\\\/\\\/in.linkedin.com\\\/pub\\\/bhagvan-kommadi\\\/0\\\/3a6\\\/b46\",\"https:\\\/\\\/x.com\\\/bhaggu\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/bhagvan-kommadi\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Generate Java Classes From Avro Schemas Using Gradle - Java Code Geeks","description":"java gradle avro schema","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/generate-java-classes-from-avro-schemas-using-gradle.html","og_locale":"en_US","og_type":"article","og_title":"Generate Java Classes From Avro Schemas Using Gradle - Java Code Geeks","og_description":"java gradle avro schema","og_url":"https:\/\/www.javacodegeeks.com\/generate-java-classes-from-avro-schemas-using-gradle.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_author":"https:\/\/www.facebook.com\/bhagvank","article_published_time":"2024-10-25T14:46:00+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/gradle-logo.jpg","type":"image\/jpeg"}],"author":"Bhagvan Kommadi","twitter_card":"summary_large_image","twitter_creator":"@bhaggu","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Bhagvan Kommadi","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/generate-java-classes-from-avro-schemas-using-gradle.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/generate-java-classes-from-avro-schemas-using-gradle.html"},"author":{"name":"Bhagvan Kommadi","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/9caeec0195d2f7a298d4af138dcd90f3"},"headline":"Generate Java Classes From Avro Schemas Using Gradle","datePublished":"2024-10-25T14:46:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/generate-java-classes-from-avro-schemas-using-gradle.html"},"wordCount":1303,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/generate-java-classes-from-avro-schemas-using-gradle.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/gradle-logo.jpg","keywords":["avro","Gradle"],"articleSection":["Enterprise Java","Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/generate-java-classes-from-avro-schemas-using-gradle.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/generate-java-classes-from-avro-schemas-using-gradle.html","url":"https:\/\/www.javacodegeeks.com\/generate-java-classes-from-avro-schemas-using-gradle.html","name":"Generate Java Classes From Avro Schemas Using Gradle - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/generate-java-classes-from-avro-schemas-using-gradle.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/generate-java-classes-from-avro-schemas-using-gradle.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/gradle-logo.jpg","datePublished":"2024-10-25T14:46:00+00:00","description":"java gradle avro schema","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/generate-java-classes-from-avro-schemas-using-gradle.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/generate-java-classes-from-avro-schemas-using-gradle.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/generate-java-classes-from-avro-schemas-using-gradle.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/gradle-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/gradle-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/generate-java-classes-from-avro-schemas-using-gradle.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Generate Java Classes From Avro Schemas Using Gradle"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/9caeec0195d2f7a298d4af138dcd90f3","name":"Bhagvan Kommadi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/a98c5590df009be2bee75469ecbeef476c2167aae277ac576f89119b021d8e2d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a98c5590df009be2bee75469ecbeef476c2167aae277ac576f89119b021d8e2d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a98c5590df009be2bee75469ecbeef476c2167aae277ac576f89119b021d8e2d?s=96&d=mm&r=g","caption":"Bhagvan Kommadi"},"description":"Bhagvan Kommadi is the Founder of Architect Corner &amp; has around 19 years experience in the industry, ranging from large scale enterprise development to helping incubate software product start-ups. He has done Masters in Industrial Systems Engineering at Georgia Institute of Technology (1997) and Bachelors in Aerospace Engineering from Indian Institute of Technology, Madras (1993). He is member of IFX forum,Oracle JCP and participant in Java Community Process. He founded Quantica Computacao, the first quantum computing startup in India. Markets and Markets have positioned Quantica Computacao in \u2018Emerging Companies\u2019 section of Quantum Computing quadrants. Bhagvan has engineered and developed simulators and tools in the area of quantum technology using IBM Q, Microsoft Q# and Google QScript.","sameAs":["http:\/\/www.architectcorner.com","https:\/\/www.facebook.com\/bhagvank","https:\/\/in.linkedin.com\/pub\/bhagvan-kommadi\/0\/3a6\/b46","https:\/\/x.com\/bhaggu"],"url":"https:\/\/www.javacodegeeks.com\/author\/bhagvan-kommadi"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/127701","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/82890"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=127701"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/127701\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/129"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=127701"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=127701"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=127701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}