Forget Writing Code.
Start Building Software.

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

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

Deploying Jenkins into AWS ECS using CDK

Learn how to deploy a production-ready Jenkins in a few lines of code using the AWS Cloud Development Kit.

Published 3 May 2021 · 9 min read · Tom Gregory

5 ways to inject secrets from AWS into Jenkins pipelines

Discover 5 better ways to manage secrets required by your Jenkins jobs.

Published 26 Apr 2021 · 7 min read · Tom Gregory