Home » Tag Archives: Gradle

Tag Archives: Gradle

Gradle Tutorial

1. Introduction In this lesson, we will study about Gradle, which is a build tool and a dependency management system very similar to Maven and Ant and designed specifically for building Java-based projects. Unlike Maven and Ant build systems, Gradle doesn’t use XML. It is actually built in DSL based on Groovy. The biggest advantage Groovy-based Gradle scripts provided was ...

Read More »

Gradle Dependencies for Java, use compile or implementation?

While I was explaining to a colleague about using Gradle for Java projects (he was moving away from Maven), we came across various code samples. Some of the examples were using the compile configuration for dependencies, while others were using implements and api. dependencies { compile 'commons-httpclient:commons-httpclient:3.1' compile 'org.apache.commons:commons-lang3:3.5' } dependencies { api 'commons-httpclient:commons-httpclient:3.1' implementation 'org.apache.commons:commons-lang3:3.5' } This post was ...

Read More »

JRebel for a Gradle Spring Boot App

There is some documentation on how to add JRebel to a Spring Boot app that uses Gradle as the build tool. It is basic but works fine. All you have to do is to add a few lines to build.gradle: if (project.hasProperty('rebelAgent')) { bootRun.jvmArgs += rebelAgent } Then set the property in gradle.properties: rebelAgent=-agentpath:[path/to/JRebel library] However there are several ways ...

Read More »

Android Studio 3.0 – Initial Impressions of Tool Support

I have been using Android Studio 3.0 since since the alpha versions, and it is good to see it finally released. This is just some initial comments on using some common and new Android tools and libraries with the 3.0 version of Android Studio and the associated Android Gradle plugin. Hopefully this will be useful for anyone thinking of upgrading ...

Read More »

Spring Boot web application with Gradle

1. Introduction Before we move on to create our demo Spring Boot web application with Gradle, I assume we all are ready with the Gradle setup. Guide to Gradle Setup Gradle Official Website 2. Creating Demo Application Now that we ready with the plugin installed, create a new Gradle project as shown below –     Clicking on Next, specify ...

Read More »

Debugging Grails 3, Spring Boot or Gradle with Eclipse

This is a small post for those who’s primary IDE is Eclipse for developing Grails 3 apps or plugins — and are still wondering how to debug their application. First of all, to clarify: there’s no “Grails” debugging, it’s just Spring Boot and Gradle these days, with Grails 3. Any way to debug these kind of applications allows you to ...

Read More »

Publishing Snapshots With Gradle’s maven-publish Plugin

I’ve recently started a new project with Gradle and decided to jump straight in – no Gradle experience, no clue about Groovy, no tutorials, just hammer on it until it works. That went surprisingly well until I decided to publish snapshots to Sonatype’s Maven snapshot repository with the incubating maven-publish plugin – that took, ahh, a little convincing. Caveat: As ...

Read More »

Build Docker Images with Maven and Gradle

One of the things that you might want to do if you are using Docker and Java is building the image from a Dockerfile in your build tool ( Maven or Gradle).  In this post I am going to show you how to do it in both cases. I am going to assume that you have the de-facto project layout, having the Dockerfile file at the ...

Read More »