SlideShare a Scribd company logo
ANDRES ALMIRAY IX-CHEL RUIZ
@AALMIRAY @IXCHELRUIZ
HARDER, BETTER,
STRONGER, FASTER
Gradle: Harder, Stronger, Better, Faster
Gradle: Harder, Stronger, Better, Faster
WHAT
Gradle is a build tool designed to take
advantage of conventions over (not instead)
configuration, while staying flexible enough to
be customized to the needs of a particular
project.
In other words, the build tool bends to the
project’s will, not the other way around.
Follows the Maven conventions.
Expressive : Prefers a DSL for describing what
needs to be done.
Extensible : Has a growing an thriving plugin
ecosystem.
Productive : Fosters fast and reproducible builds.
Convenient : It’s CI friendly (gradle wrapper).
WHY
RebelLabs © ZeroTurnaround
RebelLabs © ZeroTurnaround
Gradle: Harder, Stronger, Better, Faster
Caching of task input and outputs
Richer, configurable lifecycle
The Gradle deamon
The Gradle wrapper
Multi-project builds are hassle free
Plugin development is more intuitive
Better documentation overall
HOW
$ curl -s get.gvmtool.net | bash
$ gvm install gradle
.
├── build.gradle
├── pom.xml
└── src
├── main
│   └── java
│   └── sample
│   └── Foo.java
└── test
└── java
└── sample
└── FooTest.java
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.acme</groupId>
<artifactId>sample</artifactId>
<packaging>jar</packaging>
<version>0.0.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
😐
apply plugin: 'java'
apply plugin: 'maven-publish'
version = '0.0.0-SNAPSHOT'
group = 'com.acme'
repositories {
jcenter()
}
dependencies {
testCompile 'junit:junit:4.12'
}
😎
SCENARIOS
ü  Executable/Launchable
application
ü  Executable fat jar
ü  Installable application
EXECUTABLE
LAUNCHABLE
APPLICATION
<project ...>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<mainClass>sample.Foo</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>
$ mvn compile exec:java
😐
apply plugin: 'java'
apply plugin: 'application'
mainClassName = 'sample.Foo'
$ gradle run
😎
EXECUTABLE
FAT JAR
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>sample.Foo</Main-Class>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</plugin>
<plugins>
$ mvn package –DskipTests=true
😐
plugins {
id 'com.github.johnrengelman.shadow' version '1.2.1'
}
apply plugin: 'java'
apply plugin: 'application'
mainClassName = 'sample.Foo'
repositories { jcenter() }
dependencies { compile 'commons-lang:commons-lang:2.6' }
$ gradle shadowJar
😎
Installable application
.
├── bin
│   ├── sample
│   └── sample.bat
└── lib
├── commons-lang-2.6.jar
└── sample-0.0.0-SNAPSHOT.jar
1.  Add assembly plugin
2.  Create assembly descriptor
1.  Dist option for building the directory structure
2.  Zip option for packing all in a single file
3.  Create launch scripts (for all target platforms!)
4.  Might require custom profiles
OR configure the appassembler plugin
😐
apply plugin: 'java'
apply plugin: 'application’
mainClassName = 'sample.Foo'
repositories {
jcenter()
}
dependencies {
compile 'commons-lang:commons-lang:2.6'
}
$ gradle distZip
😎
BUT WAIT,
THERE’S
MORE
$ gvm install lazybones
$ lazybones create gradle-quickstart
sample
Gradle: Harder, Stronger, Better, Faster
license
versions
stats
bintray
shadow
izpack
java2html
git
coveralls
asciidoctor
jbake
markdown
livereload
gretty
Nexus
watch
wuff
spawn
THANK YOU!
HTTP://PEOPLE.CANOO.COM/SHARE
ANDRES ALMIRAY IX-CHEL RUIZ
@AALMIRAY @IXCHELRUIZ

More Related Content

PDF
Running CI/CD with VMWare Cloud PKS and Jenkins X
PDF
Meetup Devops-Geneva-19.10.2019
PDF
DevXDay KubeCon NA 2021: "From Kubernetes to PaaS to Developer Control Planes"
PDF
Openshift argo cd_v1_2
PDF
Workshop Azure DevOps Repos
PDF
Jenkins X intro (from google app dev conference)
PDF
Building the Web with Gradle
PPTX
Jelastic Docker Orchestrator
Running CI/CD with VMWare Cloud PKS and Jenkins X
Meetup Devops-Geneva-19.10.2019
DevXDay KubeCon NA 2021: "From Kubernetes to PaaS to Developer Control Planes"
Openshift argo cd_v1_2
Workshop Azure DevOps Repos
Jenkins X intro (from google app dev conference)
Building the Web with Gradle
Jelastic Docker Orchestrator

What's hot (20)

PDF
GitOps - Operation By Pull Request
PDF
How to Become DevOps
PDF
給 RD 的 Kubernetes 初體驗 (gcpug 2019-06 version)
PDF
K8s at Scale in the Enterprise: Self-Service Through the View of Personas
PDF
Jenkins x gitops
PDF
How we can do Multi-Tenancy on Kubernetes
PDF
給 RD 的 Kubernetes 初體驗
PDF
Serverless containers … with source-to-image
PDF
Terraform GitOps on Codefresh
PDF
Delivering Quality at Speed with GitOps
PDF
Cloud-Native Microservices
PPTX
Quick workflow of a nodejs api
PPTX
CI/CD Development in Kubernetes - Skaffold
PDF
Gitops Hands On
PDF
Eclipse 10 years Party
PPTX
ClusterEurope2018 - Bootcamp Kubernetes - présentation
PDF
Introduction to Kubernetes and GKE
PDF
India Serverless Summit 2017 - Sponsorship Deck
PDF
GitOps for Helm Users by Scott Rigby
PDF
Real World CI/CD with Kubernetes
GitOps - Operation By Pull Request
How to Become DevOps
給 RD 的 Kubernetes 初體驗 (gcpug 2019-06 version)
K8s at Scale in the Enterprise: Self-Service Through the View of Personas
Jenkins x gitops
How we can do Multi-Tenancy on Kubernetes
給 RD 的 Kubernetes 初體驗
Serverless containers … with source-to-image
Terraform GitOps on Codefresh
Delivering Quality at Speed with GitOps
Cloud-Native Microservices
Quick workflow of a nodejs api
CI/CD Development in Kubernetes - Skaffold
Gitops Hands On
Eclipse 10 years Party
ClusterEurope2018 - Bootcamp Kubernetes - présentation
Introduction to Kubernetes and GKE
India Serverless Summit 2017 - Sponsorship Deck
GitOps for Helm Users by Scott Rigby
Real World CI/CD with Kubernetes
Ad

Viewers also liked (20)

PPTX
Gradle Glam: Plugis Galore
PDF
Making the Most of Your Gradle Build
PPTX
Griffon: what's new and what's coming
PDF
Gradle Glam: Plugis Strike Back
PDF
Making the Most of Your Gradle Build
PDF
Greach - The Groovy Ecosystem
PDF
Gr8conf - The Groovy Ecosystem Revisited
PDF
Asciidoctor, because documentation does not have to suck
PDF
Machine Learning for Developers
PDF
Get Value from Your Data
PDF
Static sites with react
PDF
Static site gen talk
PDF
Part of the pipeline-why continuous testing is essential - velocity conf
PDF
Topo pal does2016
PPTX
From close to open - oscon 2016
PPTX
JBake on JUGChennai
PDF
Laziness, trampolines, monoids and other functional amenities: this is not yo...
PDF
OC 2015: The Business Behind Microservices
PPTX
JUGHyderabad - APOUC '15 - 4 minutes pitch
PDF
vJUG - The JavaFX Ecosystem
Gradle Glam: Plugis Galore
Making the Most of Your Gradle Build
Griffon: what's new and what's coming
Gradle Glam: Plugis Strike Back
Making the Most of Your Gradle Build
Greach - The Groovy Ecosystem
Gr8conf - The Groovy Ecosystem Revisited
Asciidoctor, because documentation does not have to suck
Machine Learning for Developers
Get Value from Your Data
Static sites with react
Static site gen talk
Part of the pipeline-why continuous testing is essential - velocity conf
Topo pal does2016
From close to open - oscon 2016
JBake on JUGChennai
Laziness, trampolines, monoids and other functional amenities: this is not yo...
OC 2015: The Business Behind Microservices
JUGHyderabad - APOUC '15 - 4 minutes pitch
vJUG - The JavaFX Ecosystem
Ad

Similar to Gradle: Harder, Stronger, Better, Faster (20)

PDF
Enterprise build tool gradle
PDF
Javaone - Gradle: Harder, Better, Stronger, Faster
PDF
ICONUK 2015 - Gradle Up!
PPTX
Gradle 2.Breaking stereotypes
PPTX
Сергей Моренец: "Gradle. Write once, build everywhere"
PPTX
Gradle 2.breaking stereotypes.
PPTX
Gradle 2.Write once, builde everywhere
PPTX
Gradle.Enemy at the gates
PDF
Why gradle
PPTX
Hands on Gradle
PPTX
PDF
Gradle build automation tool
PPTX
Faster java ee builds with gradle [con4921]
PDF
Gradle - Build System
PPTX
Top 10 reasons to migrate to Gradle
PDF
What's new in Gradle 4.0
PDF
PPTX
Faster Java EE Builds with Gradle
PDF
Hands on the Gradle
PPTX
Faster Java EE Builds with Gradle
Enterprise build tool gradle
Javaone - Gradle: Harder, Better, Stronger, Faster
ICONUK 2015 - Gradle Up!
Gradle 2.Breaking stereotypes
Сергей Моренец: "Gradle. Write once, build everywhere"
Gradle 2.breaking stereotypes.
Gradle 2.Write once, builde everywhere
Gradle.Enemy at the gates
Why gradle
Hands on Gradle
Gradle build automation tool
Faster java ee builds with gradle [con4921]
Gradle - Build System
Top 10 reasons to migrate to Gradle
What's new in Gradle 4.0
Faster Java EE Builds with Gradle
Hands on the Gradle
Faster Java EE Builds with Gradle

More from Andres Almiray (20)

PDF
Dealing with JSON in the relational world
PDF
Deploying to production with confidence 🚀
PDF
Going beyond ORMs with JSON Relational Duality Views
PDF
Setting up data driven tests with Java tools
PDF
Creando, creciendo, y manteniendo una comunidad de codigo abierto
PDF
Liberando a produccion con confianza
PDF
Liberando a produccion con confidencia
PDF
OracleDB Ecosystem for Java Developers
PDF
Softcon.ph - Maven Puzzlers
PDF
Maven Puzzlers
PDF
Oracle Database Ecosystem for Java Developers
PDF
JReleaser - Releasing at the speed of light
PDF
Building modular applications with the Java Platform Module System and Layrry
PDF
Going Reactive with g rpc
PDF
Building modular applications with JPMS and Layrry
PDF
Taking Micronaut out for a spin
PDF
Apache Groovy's Metaprogramming Options and You
PDF
What I wish I knew about Maven years ago
PDF
What I wish I knew about maven years ago
PDF
The impact of sci fi in tech
Dealing with JSON in the relational world
Deploying to production with confidence 🚀
Going beyond ORMs with JSON Relational Duality Views
Setting up data driven tests with Java tools
Creando, creciendo, y manteniendo una comunidad de codigo abierto
Liberando a produccion con confianza
Liberando a produccion con confidencia
OracleDB Ecosystem for Java Developers
Softcon.ph - Maven Puzzlers
Maven Puzzlers
Oracle Database Ecosystem for Java Developers
JReleaser - Releasing at the speed of light
Building modular applications with the Java Platform Module System and Layrry
Going Reactive with g rpc
Building modular applications with JPMS and Layrry
Taking Micronaut out for a spin
Apache Groovy's Metaprogramming Options and You
What I wish I knew about Maven years ago
What I wish I knew about maven years ago
The impact of sci fi in tech

Recently uploaded (20)

PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
Introduction to Artificial Intelligence
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
System and Network Administration Chapter 2
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Online Work Permit System for Fast Permit Processing
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
history of c programming in notes for students .pptx
Operating system designcfffgfgggggggvggggggggg
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Introduction to Artificial Intelligence
Adobe Illustrator 28.6 Crack My Vision of Vector Design
CHAPTER 2 - PM Management and IT Context
System and Network Administration Chapter 2
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
ISO 45001 Occupational Health and Safety Management System
Design an Analysis of Algorithms I-SECS-1021-03
VVF-Customer-Presentation2025-Ver1.9.pptx
How to Migrate SBCGlobal Email to Yahoo Easily
L1 - Introduction to python Backend.pptx
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Which alternative to Crystal Reports is best for small or large businesses.pdf
Online Work Permit System for Fast Permit Processing
2025 Textile ERP Trends: SAP, Odoo & Oracle
history of c programming in notes for students .pptx

Gradle: Harder, Stronger, Better, Faster