Build Automation

Annotation processors in Gradle with the annotationProcessor dependency configuration

Annotation processing is a Java compilation option which has been around since Java 5. It enables the generation of additional files during compilation, such as classes or documentation. Gradle abstracts the complexity of passing the correct compilation options to Java with the annotationProcessor dependency configuration, which we’ll explore in detail in this article with a […]

How to update Gradle

Using the Gradle wrapper means that a project can be fixed to a specific version of Gradle. If you want to update Gradle to a newer version though, follow the simple steps in this article. What’s my current Gradle version? Assuming your project is using the Gradle wrapper, which it most likely is, run ./gradlew […]

Gradle implementation vs. compile dependencies

Gradle version 6 supports both the implementation and compile dependency configurations. Why are they both there and which one should you use? Let’s find out with the two simple rules described in this article. Quick answer: use the implementation configuration and never compile, BUT read on for some important caveats Ways to declare dependencies When […]

Gradle project properties best practices

Gradle project properties provide an easy way to customise builds which may need to run slightly differently each time. In this article you’ll learn the most effective ways to use and set properties, along with some common scenarios you might come across in your Gradle project. Why do we need project properties in a Gradle […]

Unleashing the Spring Boot Gradle plugin

1. Introduction Spring Boot is a framework to build Java applications with minimal boilerplate code required, whereas Gradle is a highly configurable build automation tool. Using Gradle to build your Spring Boot application is a good approach, but the process is made infinitely easier using the Spring Boot Gradle plugin to provide build functionality specific […]

How to use Gradle api vs. implementation dependencies with the Java Library plugin

In this article you’ll learn the main differences between Gradle api and implementation configurations with a real-world example showing exactly how things work under the covers. The Java Library Plugin is the recommended plugin to use when building libraries that will be consumed by another project. It offers the ability to distinguish between api and […]

Scroll to top