Configuring the OCI Gradle Build Cache plugin with Travis-ci

The following post describes how to configure the oci-gradle-build-cache plugin to write to the cache when running on Travis-ci. I’m assuming dear reader that you have an Oracle Cloud account ready, but if that were not to be the case then you can sign up for an Always Free tier account at https://www.oracle.com/cloud/free/. Let’s get started! Step 1: Create a config file There are a couple of ways to configure the plugin, we’ll use a configuration file whose format is specified at this page; you must gather the following information from your account tenancy id user id default home region Read More


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


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


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


Building ThinWARs with Gradle

UPDATE: As it turns out the two POM files (javaee-api 8.0) (microprofile 1.3) consumed by the build files shown here are not real BOMs. A POM is considered a BOM if it defines a <dependencyManagement> block which neither of these files do. They are just regular POM files for which the regular dependency resolution mechanism works out of the box. This means there’s no strict requirement for building ThinWARs with Gradle 5.0, you can use earlier versions too. The Gradle build file has been updated to reflect this change however the screencast remains unchanged. Java Champion Adam Bien has advocated Read More


Hooking Gradle build scans notifications to Gitter

Recently I posted on the benefits of enabling build scans on your project, as you may appreciate in the screenshots you get a link to the build scan’s URL as a result when the build is run. This URL is build specific and only those that have access to the build log will be able to see the link. What if you wanted to share the link with others? There are many ways to share information about a project hosted on GitHub/Gitlab/Bitbucket, one of them happens to be Gitter.im. Gitter.im is a messaging system that connects with GitHub repositories, bringing Read More


Improving build times with Gradle build scans

Waiting for code to compile is something that Java developers experience daily. Waiting for a full build to finish before continuing on your next task can take even longer time. There must be a better way to increase consumption of computing power and reduce waiting times. Let me show you one way to make this happen with a concrete example. The Sentinel project by Alibaba is a very popular project in China, self described as A lightweight powerful flow control component enabling reliability and monitoring for microservices In particular this project defines capabilities that are time sensitive (sync and async) Read More


On joining Gradle

A new year brings new opportunities, and in my case a new job The Gradle build tool has been an integral part of my developer career (both closed and open source) as you may have guessed by the content found in this blog. I’ve been an avid user of Gradle since the early days (my first build was made with Gradle 0.4) which means I’ve seen the tool grow to its current state as an outsider, I’m delighted and excited to helping steer its growth from the inside. I look forward to continue engaging the broad Gradle community and beyond. 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


ˆ Back To Top