Forget Writing Code.
Start Building Software.

Get weekly inspiration to kickstart your building journey and transform your ideas into digital reality.

Gradle Tutorial for Complete Beginners

Have you heard of Gradle, but you’re not really sure what it is, why you should use it, and how to get started? This tutorial answers all of these questions and helps you take your first steps with this powerful build tool. In this Gradle tutorial you’ll learn: why we need help from build tools to build Java applications why Gradle is a great choice for building Java applications (better than Maven or custom scripts)...

Published 2 Oct 2021 · 22 min read · Tom Gregory

Gradle Build Command

Running the Gradle build command builds your Gradle project, including assembling your application and running tests. Discover all the ways to run the Gradle build command, how it works, as well as why it might sometimes be best not to run it. How to run the Gradle build command Simply put, to build your application run the following command at your Windows command prompt. gradlew build Or if you’re working in a Linux/Mac environment, it’s this....

Published 28 Sep 2021 · 5 min read · Tom Gregory

Running integration tests in Gradle

Your Gradle project can easily be setup to run integration tests using a specific Gradle task and source directory. This separates the integration tests from unit tests, making the project easier to understand and helping developers to work more productively. In this article you’ll learn the simplest way to run integration tests in your Gradle project by adding just a few lines of code to your build script. Benefits of integration tests Integration tests are just one part of an overall testing strategy....

Published 23 Sep 2021 · 7 min read · Tom Gregory

How to Exclude Gradle Dependencies

Certain combinations of transitive dependencies in a Java project cause compile and runtime issues. Fortunately, Gradle has several ways to exclude those unwanted dependencies from the Java classpath to fix your project. In this article you’ll learn the common reasons you’d want to exclude dependencies and how to use each of Gradle’s exclude strategies. Why Exclude Dependencies? When you declare a dependency in your build script, Gradle automatically pulls any transitive dependencies (dependencies of that dependency) into your project....

Updated 1 Nov 2023 · 11 min read · Tom Gregory

5 reasons to switch to the Gradle Kotlin DSL

Gradle versions 5.0+ feature the Kotlin DSL, where you define your build script using the Kotlin language from JetBrains. Whilst the Groovy DSL is more common, there are some advantages in using Kotlin. Here are the top 5 reasons to switch to the Gradle Kotlin DSL. 1) Simplified plugins syntax Gradle comes with built in plugins that you apply to a project by specifying the plugin id only. No version is required....

Published 22 Jul 2021 · 6 min read · Tom Gregory

10 Gradle best practices to supercharge your project

When you use a build tool like Gradle, there are often many ways to do the same thing. How can you decide? Experience counts for a lot, but for something more practical I’ve compiled this list of 10 essential Gradle best practices. If you incorporate these into your project, you’ll have a good chance of success. 1. Always use the Gradle wrapper The wrapper is a special script included in your project which handles downloading the correct Gradle version and executing a build....

Published 7 Jul 2021 · 12 min read · Tom Gregory

Gradle Task Inputs and Outputs

Declaring Gradle task inputs and outputs is essential for your build to work properly. By telling Gradle what files or properties your task consumes and produces, the incremental build feature kicks in, improving the performance of your build. You’ll also be following best practices, allowing you to easily create more complex projects. In this article, you’ll learn how Gradle task inputs and outputs work, why they’re important, as well as practically how to implement them in your own projects....

Updated 9 Jan 2024 · 13 min read · Tom Gregory

bmuschko Docker Gradle plugin review

If you just want to build Docker images within your Gradle project then it might frustrate you to have to decide which plugin to use. At the time of writing, there were 149 plugins listed on the Gradle plugin portal matching the search term Docker. Whilst I can’t make the choice for you, this article will help you get to a decision, with a review of the bmuschko Docker Gradle plugin....

Published 15 Jun 2021 · 10 min read · Tom Gregory

Using Jenkins and Kaniko to build Docker images in AWS

Learn how to use Kaniko from Jenkins to easily build and push Docker images.

Published 22 May 2021 · 11 min read · Tom Gregory