liveBook · Manning

Gradle

As explained in Kafka Streams in Action, Second Edition

Gradle is a build automation tool that defines and executes project tasks, dependency management, and source-generation workflows.

Gradle is a build automation tool for defining and running project tasks, managing dependencies, and coordinating source-generation workflows. In a schema-driven application, it connects schema files with generated Java objects and Schema Registry operations. section 3.2.6

Gradle plugins support several schema and registry tasks:

  • The Schema Registry plugin tests compatibility, registers schemas, and configures compatibility. section 3.2.6
  • The Avro and Protobuf plugins generate Java objects from .avsc and .proto files. section 3.2.6
  • The js2p-gradle plugin generates Java code from JSON Schema files. section 3.2.6

Registering a schema

Run ./gradlew streams:registerSchemasTask from the project’s base directory. The task registers every schema declared inside the register block of streams/build.gradle, while the plugin uses Schema Registry’s REST API through SchemaRegistryClient. section 3.2.7

./gradlew streams:registerSchemasTask

Use the Gradle task listing to inspect the command that registers configured schemas. section 3.2.7

How Kafka Streams in Action, Second Edition covers it

How deep it goes
Explains plugin roles and demonstrates a configured registration task, without detailing Gradle’s broader build lifecycle.
Examples
Uses an Avro schema, streams/build.gradle configuration, and the ./gradlew streams:registerSchemasTask command.
What it assumes
Assumes schema files and a Gradle project, while explaining how schemas become generated domain objects and registry tasks.
What you can do after
Operate/configure schema plugins to register schemas and generate Java objects from supported schema formats.
How it connects
Connects Gradle with Schema Registry, Avro, Protobuf, JSON Schema, Java code generation, and REST APIs.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kafka Streams in Action, Second Edition. The section links point to the parts of the book it draws on.