Running Gradle inside Maven

As organizations evolve so do their codebases. Apache Maven and Gradle are the most popular and widely used build tools in the JVM. Usually multi-project builds rely on a single build tool to accomplish the job but there may be uses cases where you need to combine both, having Maven be the one leading the pack. One possible use case is to build a companion Gradle plugin, this is the case for ByteBuddy and Quarkus; another use case is to run a composite build with Maven and Gradle projects mixed together. In this post I’ll show how Gradle can be Read More


Hack.Commit.Push Paris 2019

I’m so excited to share what happened at Hack.Commit.Push Paris 2019. It’s said that an image speaks louder than words, so here it is Success! The event transcurred as follows as far as I remember (we event organizers participated in the hacks too thus we ended up jumping from one place to the next, fun!). We arrived in the morning to help setup the venue and get ready for registration, just to find out that Florent, Dilek, Hervé, and Michael had made the necessary preparations already, there were so eager to get started that they beat us to the punch. Read More


Composite builds with Maven and Gradle

Gradle offers a neat feature called “Composite Builds” which allows one project to consume artifacts from other builds as if they were part of a single coherent unit. This feature is pretty easy to setup, however you might not know that it’s possible to do the same with Maven. Here’s how. Let’s say you have a producer and consumer projects, where producer is set as a dependency on consumer. If these two projects are to have their own release lifecycles their file structure may look like this The contents of the Gradle build files look like so And in the Read More


Announcing oci-gradle-plugin version 0.1.0

The first release of the OCI Gradle Plugin is out! The plugin lets you interact with the Oracle Cloud Infrastructure Java SDK. The behavior provided by OCI Java SDK is quite extensive, thus for this release the plugin delivers the minimal features required to setup and work with instances. Here’s an example, the following command will setup an Instance in a particular Compartment, while at the same time setting up a new VCN, Subnets, an InternetGateway and an InstanceConsoleConnection, allowing you to SSH to the freshly created instance $ ./gradlew setupInstance \ –compartment-id=ocid1.compartment.oc1…noa \ –instance-name=test \ –image=Oracle-Linux-7.6-2019.04.18-0 \ –shape=VM.Standard2.1 \ Read More


Hack.Commit.Push

Last month I twitted a rather cryptic message Hack — Andres Almiray (@aalmiray) March 1, 2019 Commit — Andres Almiray (@aalmiray) March 2, 2019 Push — Andres Almiray (@aalmiray) March 2, 2019 Followed by another one hack.commit.push — Andres Almiray (@aalmiray) March 8, 2019 Today I’m happy to announce the meaning behind these messages: http://hack-commit-pu.sh, the first ever, full day Hackergarten conference is open! If you have attended a Hackergarten before then you know what to expect, if not then let me say a few words about Hackergarten. The group was born in Basel, Switzerland back in 2010. The point Read More


New features in Kordamp Gradle plugins

Version 0.14.0 of the Kordamp Gradle plugin suite is ready! This release brings a host of updates that should make your life easier when looking for gaining insights into your build. To begin with, all reporting tasks provided by the org.kordamp.gradle.base plugin will use ANSI colors if the terminal supports them. This make its easier to determine a particular setting, here’s for example the settings for the info and test (new) sections found in the alibaba/Sentinel project: The color code is as follows white: property names yellow: string literals cyan: numbers green: boolean, when true red: boolean, when false Speaking Read More


Amazon Corretto 8 & JavaFX

Back in November 2018 the Father of Java, James Gosling, took to the stage during the Devoxx BE opening keynote and announced that Amazon was working on their own JDK based on OpenJDK. You may remember also last year the Java Champions along with all JDK vendors put together a document stating the different options at your disposal to run Java for free and/or with paid support. Java is Still Free English Spanish Portuguese Japanese Today is the day when Amazon announced the immediate availability of Amazon Corretto 8. Why is this good news? Because Amazon has stated they will Read More


Gaining insight into a Gradle build

Every Gradle build has access to a default set of tasks that can deliver insight information on your build settings. You probably have come across the dependencies task. This task can display dependencies associated with all configurations of a particular project; you can even instruct which configuration to be queried if the list of configurations happens to be very long. Let’s say we have a Java project that looks like this build.gradle plugins { id ‘java’ id ‘org.kordamp.gradle.project’ version ‘0.11.0’ } ext.build_property = ‘build’ config { license { enabled = false } publishing { enabled = false } } repositories Read More


5 Gradle plugins for working with modular Java projects

Java 9 was release in September 2017 and with it came a brand new modular platform known as JPMS, delivered by Project Jigsaw. Building projects that an leverage this new feature can be a bit daunting however the Gradle plugins in the following list can help you in keeping things under control. 1. JDeps – https://github.com/aalmiray/jdeps-gradle-plugin This plugin generates a report of your production code and compile/runtime dependencies using the jdeps tool available since Java 8. Jdeps can tell you if your codebase is vulnerable to API changes such as relying on internal APIs (like sun.misc.Unsafe) even if you don’t Read More


The Gradle SuperPOM

Following up with the Gradle POM, where a familiar structure found in Maven projects can be brought to Gradle projects, I’d like to discuss another Maven feature that many see as an advantage and that’s lacking in Gradle: the ability to enforce settings in a top-down fashion with hierarchical POM files. In Maven, a parent POM delivers configuration that will be used by a child POM as is. Children POMs have the option to override and extend these properties. A typical use case in parent POMs is to provide <pluginManagement> and <dependencyManagement> sections; they also configure default dependencies, properties, plugins, Read More


ˆ Back To Top