
Explore what Gradle is, its advantages, and how to install and create basic and multi-module Java projects with Groovy or Kotlin build scripts.
Explore a well-organized, hands-on Gradle for Java developers course with sections, quizzes, and assignments, plus Q&A support to help you install Gradle and the Spring Tool Suite and practice concepts.
Download or clone all completed projects from the GitHub repository by Bharath Thippireddy to study, run, and experiment with them.
Gradle is a build automation tool that blends Ant and Maven strengths while addressing their limitations. Use Groovy or Kotlin DSL to write customizable tasks with convention over configuration.
Discover why Gradle is the standard Android build tool and how it manages dependencies with Maven repositories, custom scopes, caching, daemons, and plugins.
Install gradle on your machine by following platform-specific steps, using brew for macOS or SDKMAN on unix-based systems, then set the path so gradle commands run anywhere.
Learn to use the Gradle wrapper on Windows by running GradleW.bat for your first project and applying the correct command or task to execute.
Create your first Gradle project, add a custom task, and run it with the Gradle wrapper; learn project setup, settings, and how wrappers enable project-specific Gradle versions.
Create a standalone java project with gradle command line interface, generating a single app subproject and standard folder structure (source main java, source test java, resources) with a com.bharath.gradle package.
Explore Gradle tasks to build and run a Java project, including compile Java, compile test Java, test, jar, distZip, and run, powered by the application and Java plugins.
Explore dependencies and repositories in a Java Gradle project, detailing how to declare group, artifact, and version, and explain scopes such as implementation and testImplementation with Maven Central and JUnit.
Gradle retrieves project dependencies from multiple repositories, including Maven Central, JCenter, and custom or local Maven repositories, while caching them locally for faster builds and handling transitive dependencies automatically.
Explore Gradle configurations and how dependencies flow through source sets, tests, and war packaging. Compare api and implementation, compile only, and legacy maven scopes.
Discover how Gradle builds progress through initialization, configuration, and execution phases, from project objects to acyclic task graphs, and learn how to structure tasks with doFirst and doLast.
Start the Gradle daemon to run builds in the background, speeding subsequent builds by reusing calculations and memory. Use --daemon or --no-daemon to enable or disable it as needed.
Compare gradle and maven by examining plugins, dependencies, and repositories, and see how configurations map between the tools; learn why groovy and kotlin dsl simplify build customization.
Install Spring Tool Suite, an Eclipse-based IDE, to develop Spring and Groovy projects; learn to add Groovy development tools through the install new software workflow and create a Groovy project.
Create a Groovy project in STS, add a Groovy script, and execute it to print two strings to the console, no main method required.
Explore Groovy data types and type inference, compare with Java types, and use def, wrappers, and primitives; learn strings, multiline strings, and regex patterns.
Learn how groovy closures work like lambdas, define and assign them to variables, invoke with call, pass parameters, and use defaults and the Elvis operator with the times method.
Explore groovy collections by defining lists with shorthand syntax, switching between list types, and using left shift to add or remove elements. Traverse with closures and preview permutations and combinations.
Learn to define and use sets and maps in Groovy, including creating a set with as set and handling duplicates, and performing map operations like get and put.
Learn how to define and call Groovy methods, use dynamic typing with def, set default values, return values, pass named parameters via maps, and print results.
Learn to create Groovy classes and objects, use default and map-based constructors, access properties via getters and setters, override accessors, and use static members with a patient example.
Understand how gradle uses a build.gradle as a project object, with repositories, dependencies, and plugins configured by methods and closures in Groovy.
Access and set Gradle project properties via the project object, including name, description, and version, and see how these values shape jar naming and build outputs.
Learn to add custom properties to a Gradle project using extension properties, accessing them via project.ext and project.property, and understand when to use inbuilt versus extension properties.
Explore how Gradle uses a project object to create and add task objects, including built-in and plugin tasks, and learn how the task method defines tasks with actions.
Learn how to work with the Gradle task object by accessing its properties and methods, defining variables, and establishing task relationships using depends on and finalized by, including default tasks.
Learn to create, build, and run a simple Java EE web app with Gradle, including a coupon flow via a servlet and a war file deployable to Tomcat.
Create a Java web application skeleton with Gradle CLI, set up the first web app, organize web resources, and place the coupons servlet in com.bharath.gradle for later coding.
Create index.html with a coupon form linking to /coupon, implement a servlet that handles doGet and doPost to process the coupon, set a discount attribute, and forward to response.jsp.
Learn to build and package a Java web application into a war file with the Gradle war plugin, replacing the application plugin and using Jakarta Servlet API compile only.
Apply this course update by using the Gritti plugin version 4.0.3 or higher, and do not use 4.0.0 to avoid issues when running Gradle App.run.
Launch and test a java web app using the gritty gradle plugin, running on jetty by default or tomcat, with configurable port and access on localhost:8080.
Learn to create a multi-module Java application with web, services, integration, and data layers, configure a root project with settings.gradle and build.gradle, and manage dependencies for all child projects.
Upgrade to Gradle 6.6+ enables automatically creating multi-module projects with an app module, settings.gradle, and reusable build logic across modules.
Create a multi-module Gradle project by renaming the app to services and duplicating it to create web layer, data layer, and integration layer, configure settings.gradle, and run Gradle build.
Download the Gradle update dot txt for reference. Gradle 8.12+ requires capturing the project variable at configuration time in the task and reusing it in doLast to avoid execution-time errors.
Learn to create and apply Gradle tasks across a multi-module project, including printing the project name and using all projects, subprojects, or specific projects to control execution.
Centralize common build logic across services, data, and integration subprojects in the root build.gradle, remove per-project clutter, and adopt the apply plugin syntax to streamline builds.
Learn how to apply project properties to all subprojects in Gradle, using version and group in the subprojects block, with web projects overriding logic.
Master multi-module gradle builds by cleaning and building specific projects using the project method for dependencies. Configure web, services, data, and integration to produce a complete war with all jars.
Discover how to show dependencies for a subproject in Gradle with a simple command, revealing the full dependency tree including transitive dependencies.
Configure JUnit and Mockito to unit test a Java servlet, mock HTTP request and response, verify doGet and doPost, and explore Jacoco and SonarQube reports in a Jenkins workflow.
Update your project for testing by adding JUnit and Mockito dependencies from the Maven repository, and switch from test compile to test implementation to use the latest scopes.
Configure test support by adding JUnit and Mockito dependencies to Gradle and creating a coupon servlet test with mocked HTTP request, response, and request dispatcher.
Write a unit test for the coupon servlet's doGet method using @Test and Mockito to mock request, response, and getWriter, asserting the writer outputs Super sale.
Write and run a unit test for a servlet doPost method by mocking request parameter and request dispatcher, verifying setAttribute and forward calls, and validating with a Gradle build.
Generate a Jacoco test coverage report for your Java project using Gradle, configure the plugin, and ensure tests run before reporting to view HTML coverage results.
Install the community edition of SonarQube, unzip, and run the bin script (sonar.bat or sonar.sh) from bin folder, adding it to PATH. Then access localhost:9000 and log in as admin/admin.
learn to run the Gradle sonar command with a security token by generating a token in the sonar dashboard and passing it via the sonar.login property.
Update the Gradle workflow by migrating from sonar cube to sonar and passing a generated sonar token via build.gradle to run sonar tasks.
Run Gradle SonarQube to scan your project, identify vulnerabilities and code smells, then fix issues such as missing @Override annotations and re-run the scan.
Download the Jenkins war file, run it with java -jar jenkins.war, and unlock with the initial password on localhost:8080, then install plugins and set up the admin user.
Configure Jenkins to run a Gradle build by installing the Gradle plugin, configuring Gradle in global tools, and invoking a build in a freestyle project.
Create and run a Spring Boot project with Gradle, configure Spring Web, then boot run to build a boot jar and expose a REST endpoint.
Compare the Gradle build script with Maven pom.xml to see how a parent specifies the Spring Boot version, and how plugins and BOM manage dependencies for Spring Boot projects.
Migrate a spring boot maven project to a gradle project using the coupon and product services, and bring them up on ports 9091 and 9090.
Convert a Spring Boot Maven project to a Gradle project by using Gradle to generate build files, add Spring Boot plugins, and run the app on port 9091.
Import an existing Gradle project into STS IDE using Spring Tool Suite, then run the app with boot run and verify in console and browser.
Master Gradle for Java and Spring Boot Development
What Students Are Saying
“This was an exceptionally good course! I found what I needed in the first 45 minutes, and I watched the rest just to make sure I had full coverage. I now feel completely competent in Gradle and have already converted three of my projects to use it. Everything is working surprisingly well. Good job!”
— Keith Swenson
“The course is very informative, and the fundamentals are explained clearly with real-world examples. The sections on multi-module Gradle projects and custom plugins are especially valuable for Java developers. The instructor’s voice is clear and engaging. Thank you!”
— Sunil Kumar
“I was waiting for Bharath’s Gradle course and purchased it immediately when it was released. I had recently joined a company where we use a large Gradle-based project, and I struggled to understand the build configuration. I read blogs and watched YouTube videos, but many concepts were still unclear. This course explained everything in a simple, precise, and practical way.”
— Saurav
Why Take This Course?
Are you a Java or Spring Boot developer who wants to master Gradle?
Are you a developer with a Maven background looking to quickly transition to Gradle?
If so, this course is designed for you.
Gradle is one of the most popular build automation tools in the Java ecosystem. It is widely used for Java, Spring Boot, Android, and enterprise applications because of its flexibility, powerful dependency management, and excellent build performance.
In this hands-on course, you’ll master Gradle by building real Java and Spring Boot projects while learning industry best practices.
What You’ll Learn
By the end of this course, you’ll be able to:
Understand what Gradle is and why it has become the preferred build automation tool.
Create standalone Java projects using the Gradle command line.
Compare Gradle’s settings.gradle and build.gradle with Maven’s pom.xml.
Learn enough Groovy to confidently understand and customize Gradle build scripts.
Understand the structure and anatomy of Gradle build files.
Build Java web applications using Gradle.
Use the WAR and Gretty plugins to build, deploy, and run web applications.
Create custom Gradle tasks.
Build multi-module Gradle projects.
Manage dependencies between multiple modules.
Share common configuration and dependencies across modules.
Write and execute unit tests using JUnit and Mockito.
Generate code coverage reports using the JaCoCo plugin.
Configure SonarQube for static code analysis.
Build Spring Boot projects with Gradle.
Migrate existing Spring Boot Maven projects to Gradle.
Understand and customize the build.gradle file in Spring Boot applications.
Create reusable custom Gradle plugins.
Requirements
Basic knowledge of Java programming
Basic understanding of Java Web Development
Gradle
Spring Tool Suite (STS) or your preferred Java IDE
Complete installation and setup instructions are included in the course.
What You’ll Achieve
After completing this course, you’ll be able to:
Build Java applications confidently using Gradle.
Create and package Java web applications.
Develop Spring Boot applications using Gradle.
Convert Maven projects to Gradle with confidence.
Build and manage enterprise-scale multi-module projects.
Create custom Gradle tasks and plugins.
Apply Gradle best practices in real-world Java and Spring Boot projects.
Everything is taught through practical, step-by-step demonstrations with downloadable source code, allowing you to immediately apply what you learn in your own projects.