Home » Tag Archives: Gradle

Tag Archives: Gradle

Getting Started With Gradle: Integration Testing

gradle-logo

Because the standard project layout of a Java project defines only one test directory (src/test), we have no standard way to add integration tests to our Gradle build. If we want to use the standard project layout, we can add integration tests to our Gradle build by using one of the following options:       We can add our ...

Read More »

Gradle Goodness: Handle Copying Duplicate Files

gradle-logo

In Gradle we can configure how duplicate files should be handled by the Copy task. Actually we can configure how duplicate files are handled by any task that implements the CopySpec interface. For example archive tasks also implements this interface. We must use the setDuplicatesStrategy method to configure how Gradle behaves. The parameter is a value of the enumeration DuplicatesStrategy. ...

Read More »

How to exclude libraries from all dependencies in Gradle

gradle-logo

I am using Spring boot. Spring boot by default comes with logback. I wanted to use log4j (for whatever reasons..) In order to do that I had to exclude logback and add new log4j dependencies: Logback is “hidden” inside this package: compile("org.springframework.boot:spring-boot-starter:$project.ext.springBootVersion") { exclude module: 'org.springframework.boot:spring-boot-starter-logging' } compile("org.springframework.boot:spring-boot-starter-log4j:$project.ext.springBatchVersion") Now when you try to run app you get this Exception: SLF4J: Class ...

Read More »

Automatic promotion of artifacts to Maven Central from Gradle

apache-maven-logo

Quick tutorial how to promote/release artifacts in a Gradle project to Maven Central, without clicking in the Nexus GUI with Gradle Nexus Staging Plugin. Introduction Maven Central (aka The Central Repository) is (probably) the world’s largest set of open source artifacts used by Java and JVM-based projects. It was founded by the creators of Apache Maven and it has been ...

Read More »

Building Vert.x projects using Gradle

gradle-logo

We currently use Vert.x in several internal and external projects. Until the most recent project we where building our Vert.x modules using Maven. Gradle is our build tool of choice, but the default approach described at the Vert.x site caused several issues: The task of cloning, cleaning and configuring the template project is error-prone; The template project does not support recent Gradle versions >= 2.x; This ...

Read More »

Dropwizard, MongoDB and Gradle Experimenting

gradle-logo

Introduction I created a small project using Dropwizard, MongoDB and Gradle. It actually started as an experimenting Guava cache as buffer for sending counters to MongoDB (or any other DB). I wanted to try Gradle with MongoDB plugin as well. Next, I wanted to create some kind of interface to check this framework and I decided to try out DropWizard. ...

Read More »

Getting Started with Gradle: Creating a Multi-Project Build

gradle-logo

Although we can create a working application by using only one module, sometimes it is wiser to divide our application into multiple smaller modules. Because this is a rather common use case, every self-respecting build tool must support it, and Gradle is no exception. If a Gradle project has more than one module, it is called a multi-project build. This ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close