Gradle is a popular choice for Kafka projects in Java
Before developing Kafka producers and consumers in Java, we’ll have to set up a simple Kafka Java project that includes common dependencies that we’ll need, namely:- Kafka dependencies
- Logging dependencies
Creating a Kafka Gradle project with build.gradle and setting up dependencies
In IntelliJ IDEA, create a new Java Gradle project (File > New > Project)

**build.gradle**
file. The build.gradle
is a default Gradle file that carries all the information regarding the Group and Version values . The user needs to define all the necessary project dependencies in the build.gradle
file. Go to the build.gradle
file.

dependencies { ... }
block.
Add a dependency for Kafka client and logging dependencies as shown below

Creating your first class
Create a java package say,io.conduktor.demos.kafka.HelloWorld

0
. This means that your Java application has run successfully.
Expand the ‘External Libraries’ on the Project panel and verify that it displays the dependencies that we added for the project in build.gradle
file
