SlideShare a Scribd company logo
1 of 38
Download to read offline
Gradle Ex Machina
Andres Almiray
@aalmiray
The preceding is intended to outline our general product direction. It is intended for information purposes
only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code,
or functionality, and should not be relied upon in making purchasing decisions. The development,
release, timing, and pricing of any features or functionality described for Oracle’s products may change
and remains at the sole discretion of Oracle Corporation.
Statements in this presentation relating to Oracle’s future plans, expectations, beliefs, intentions and
prospects are “forward-looking statements” and are subject to material risks and uncertainties. A detailed
discussion of these factors and other risks that affect our business is contained in Oracle’s Securities
and Exchange Commission (SEC) filings, including our most recent reports on Form 10-K and Form 10-
Q under the heading “Risk Factors.” These filings are available on the SEC’s website or on Oracle’s
website at http://www.oracle.com/investor. All information in this presentation is current as of September
2019 and Oracle undertakes no duty to update any statement in light of new information or future
events.
Safe Harbor
Copyright © 2019 Oracle and/or its affiliates.
pom.xml
• POM stands for Project Object Model.
• A POM file defines both how a project should be built and how
consumers may interact with the published artifacts.
• Maven delivers lots of features out of the box thanks to the
hierarchical nature of the POM.
• The Maven Super POM provides default configuration for
common plugins such as compiler, resources, surefire, etc.
• The strict nature of the structure found in the POM allows anyone
to understand the configuration.
build.gradle
• Gradle build files only specify how projects should be built.
• The definition for consumers is delivered through a generated
POM file.
• Gradle builds are highly customizable, resulting in a wider range
of build patterns.
Can we have a maven-like
structure on top of gradle?
Not Maven!
http://github.com/aalmiray/kordamp-gradle-plugins
https://aalmiray.github.io/kordamp-gradle-plugins
Project DSL
The project plugin
plugins {

id 'org.kordamp.gradle.project' version ‘0.29.0’
}



config {

release = (rootProject.findProperty('release') ?: false).toBoolean()



info {

name = 'Sample'

vendor = 'Acme'

description = 'Sample project'



links {

website = 'https://github.com/joecool/sample'

issueTracker = 'https://github.com/joecool/sample/issues'

scm = 'https://github.com/joecool/sample.git'

}



people {

person {

id = 'joecool'

name = 'Joe Cool'

roles = ['developer']

}

}

}
…
}
Provided behavior
• The project plugin applies the following plugins
org.kordamp.gradle.base
org.kordamp.gradle.build-info
org.kordamp.gradle.minpom
org.kordamp.gradle.jar
org.kordamp.gradle.source-jar
org.kordamp.gradle.javadoc
org.kordamp.gradle.license
org.kordamp.gradle.jacoco
org.kordamp.gradle.publishing
org.kordamp.gradle.testing
org.kordamp.gradle.apidoc
org.kordamp.gradle.source-stats
org.kordamp.gradle.source-html
org.kordamp.gradle.bintray
org.kordamp.gradle.base
Default tasks
• Gradle provides the following tasks
projects
dependencies
properties
tasks
Additional tasks
• The base plugin provides the following tasks
extensions
plugins
repositories
configurations
repositories
sourceSets
projectProperties
effectiveSettings
java/groovy/scala compileSettings
testSettings
publicationSettings
Demo
Additional plugins
• The following plugins can be applied explicitly
org.kordamp.gradle.kotlindoc
org.kordamp.gradle.scaladoc
org.kordamp.gradle.source-xref
org.kordamp.gradle.bom
org.kordamp.gradle.clirr
org.kordamp.gradle.guide
org.kordamp.gradle.integration-test
org.kordamp.gradle.functional-test
Super POM
The Maven super POM
• POMs are hierarchical.
• The chain resolves all the way to the top where you find the
Maven Super POM.
• Super POM configures lots of default & useful behavior.
The Gradle super POM
• Gradle does not offer this behavior out of the box.
• But it can be “faked” using a custom plugin.
• The plugin applies the default behavior that consuming projects
require.
Gradle Super POM
demo
File structure
Standard (gradle)
.
├── build.gradle
├── guide
│   └── build.gradle
├── project1
│   └── build.gradle
├── project2
│   └── build.gradle
└── settings.gradle
.
├── build.gradle
├── guide
│   └── guide.gradle
├── project1
│   └── project1.gradle
├── project2
│   └── project2.gradle
└── settings.gradle
Standard (gradle)
$ cat settings.gradle
include 'guide'
include 'project1'
include 'project2'
$ cat settings.gradle
include 'guide'
include 'project1'
include 'project2’
project(':guide').buildFileName =
'guide.gradle'
project(':project1').buildFileName =
'project1.gradle'
project(':project2').buildFileName =
'project2.gradle'
Standard (gradle)
$ cat settings.gradle
buildscript {

repositories {

gradlePluginPortal()

}

dependencies {

classpath 'org.kordamp.gradle:settings-gradle-plugin:0.29.0

}

}


apply plugin: 'org.kordamp.gradle.settings'



projects {

layout = 'standard'

}
Two-level (gradle)
.
├── build.gradle
├── docs
│   └── guide
│       └── build.gradle
└── subprojects
    ├── project1
    │   └── build.gradle
    └── project2
        └── build.gradle
.
├── build.gradle
├── docs
│   └── guide
│       └── guide.gradle
└── subprojects
    ├── project1
    │   └── project1.gradle
    └── project2
        └── project2.gradle
Two-level (gradle)
$ cat settings.gradle
include 'guide'
include 'project1'
include 'project2'
project(':guide').projectDir = new File(“$settingsDir/docs/guide”)
project(':project1').projectDir = new File(“$settingsDir/subprojects/project1”)
project(':project2').projectDir = new File(“$settingsDir/subprojects/project2”)
// update names if required
project(':guide').buildFileName = 'guide.gradle'
project(':project1').buildFileName = 'project1.gradle'
project(':project2').buildFileName = 'project2.gradle'
Two-level (gradle)
$ cat settings.gradle
buildscript {

repositories {

gradlePluginPortal()

}

dependencies {

classpath 'org.kordamp.gradle:settings-gradle-plugin:0.29.0

}

}


apply plugin: 'org.kordamp.gradle.settings'



projects {

layout = 'two-level'
directories = ['docs', 'subprojects']

}
Multi-level (gradle)
.
├── build.gradle
├── guide
│   └── build.gradle
└── subprojects
    ├── project1
    │   └── build.gradle
    └── project2
        └── build.gradle
.
├── build.gradle
├── guide
│   └── guide.gradle
└── subprojects
    ├── project1
    │   └── project1.gradle
    └── project2
        └── project2.gradle
Multi-level (gradle)
$ cat settings.gradle
buildscript {

repositories {

gradlePluginPortal()

}

dependencies {

classpath 'org.kordamp.gradle:settings-gradle-plugin:0.29.0

}

}


apply plugin: 'org.kordamp.gradle.settings'



projects {

layout = 'multi-level'

directories = [

'guide',

'subprojects/project1',

'subprojects/project2'

]

}
http://andresalmiray.com/newsletter
http://andresalmiray.com/editorial
Thank you!
ANDRES ALMIRAY
@AALMIRAY
ANDRESALMIRAY.COM

More Related Content

Similar to Gradle Ex Machina - Devoxx 2019

Gradle,the new build system for android
Gradle,the new build system for androidGradle,the new build system for android
Gradle,the new build system for androidzhang ghui
 
Making the Most of Your Gradle Build
Making the Most of Your Gradle BuildMaking the Most of Your Gradle Build
Making the Most of Your Gradle BuildAndres Almiray
 
Make Your Build Great Again (DroidConSF 2017)
Make Your Build Great Again (DroidConSF 2017)Make Your Build Great Again (DroidConSF 2017)
Make Your Build Great Again (DroidConSF 2017)Jared Burrows
 
Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]Ryan Cuprak
 
Gradle(the innovation continues)
Gradle(the innovation continues)Gradle(the innovation continues)
Gradle(the innovation continues)Sejong Park
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation ToolIzzet Mustafaiev
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with GradleRyan Cuprak
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with GradleRyan Cuprak
 
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]David Buck
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)mfrancis
 
Javaone - Gradle: Harder, Better, Stronger, Faster
Javaone - Gradle: Harder, Better, Stronger, Faster Javaone - Gradle: Harder, Better, Stronger, Faster
Javaone - Gradle: Harder, Better, Stronger, Faster Andres Almiray
 
Enterprise build tool gradle
Enterprise build tool gradleEnterprise build tool gradle
Enterprise build tool gradleDeepak Shevani
 
Oracle GoldenGate on Docker
Oracle GoldenGate on DockerOracle GoldenGate on Docker
Oracle GoldenGate on DockerBobby Curtis
 
Play Framework vs Grails Smackdown - JavaOne 2013
Play Framework vs Grails Smackdown - JavaOne 2013Play Framework vs Grails Smackdown - JavaOne 2013
Play Framework vs Grails Smackdown - JavaOne 2013Matt Raible
 
Making the Most of Your Gradle Build
Making the Most of Your Gradle BuildMaking the Most of Your Gradle Build
Making the Most of Your Gradle BuildAndres Almiray
 
Oracle zdm Migrate Amazon RDS Oracle to Oracle Autonomous 2021 Kamalesh Ramas...
Oracle zdm Migrate Amazon RDS Oracle to Oracle Autonomous 2021 Kamalesh Ramas...Oracle zdm Migrate Amazon RDS Oracle to Oracle Autonomous 2021 Kamalesh Ramas...
Oracle zdm Migrate Amazon RDS Oracle to Oracle Autonomous 2021 Kamalesh Ramas...Kamalesh Ramasamy
 

Similar to Gradle Ex Machina - Devoxx 2019 (20)

Gradle,the new build system for android
Gradle,the new build system for androidGradle,the new build system for android
Gradle,the new build system for android
 
Making the Most of Your Gradle Build
Making the Most of Your Gradle BuildMaking the Most of Your Gradle Build
Making the Most of Your Gradle Build
 
Make Your Build Great Again (DroidConSF 2017)
Make Your Build Great Again (DroidConSF 2017)Make Your Build Great Again (DroidConSF 2017)
Make Your Build Great Again (DroidConSF 2017)
 
Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]
 
Gradle(the innovation continues)
Gradle(the innovation continues)Gradle(the innovation continues)
Gradle(the innovation continues)
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation Tool
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
 
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
 
Javaone - Gradle: Harder, Better, Stronger, Faster
Javaone - Gradle: Harder, Better, Stronger, Faster Javaone - Gradle: Harder, Better, Stronger, Faster
Javaone - Gradle: Harder, Better, Stronger, Faster
 
Advanced modular development
Advanced modular development  Advanced modular development
Advanced modular development
 
Gradle - Build System
Gradle - Build SystemGradle - Build System
Gradle - Build System
 
Enterprise build tool gradle
Enterprise build tool gradleEnterprise build tool gradle
Enterprise build tool gradle
 
Oracle GoldenGate on Docker
Oracle GoldenGate on DockerOracle GoldenGate on Docker
Oracle GoldenGate on Docker
 
Play Framework vs Grails Smackdown - JavaOne 2013
Play Framework vs Grails Smackdown - JavaOne 2013Play Framework vs Grails Smackdown - JavaOne 2013
Play Framework vs Grails Smackdown - JavaOne 2013
 
Making the Most of Your Gradle Build
Making the Most of Your Gradle BuildMaking the Most of Your Gradle Build
Making the Most of Your Gradle Build
 
Oracle zdm Migrate Amazon RDS Oracle to Oracle Autonomous 2021 Kamalesh Ramas...
Oracle zdm Migrate Amazon RDS Oracle to Oracle Autonomous 2021 Kamalesh Ramas...Oracle zdm Migrate Amazon RDS Oracle to Oracle Autonomous 2021 Kamalesh Ramas...
Oracle zdm Migrate Amazon RDS Oracle to Oracle Autonomous 2021 Kamalesh Ramas...
 
Grails 101
Grails 101Grails 101
Grails 101
 

More from Andres Almiray

Creando, creciendo, y manteniendo una comunidad de codigo abierto
Creando, creciendo, y manteniendo una comunidad de codigo abiertoCreando, creciendo, y manteniendo una comunidad de codigo abierto
Creando, creciendo, y manteniendo una comunidad de codigo abiertoAndres Almiray
 
Liberando a produccion con confianza
Liberando a produccion con confianzaLiberando a produccion con confianza
Liberando a produccion con confianzaAndres Almiray
 
Liberando a produccion con confidencia
Liberando a produccion con confidenciaLiberando a produccion con confidencia
Liberando a produccion con confidenciaAndres Almiray
 
OracleDB Ecosystem for Java Developers
OracleDB Ecosystem for Java DevelopersOracleDB Ecosystem for Java Developers
OracleDB Ecosystem for Java DevelopersAndres Almiray
 
Softcon.ph - Maven Puzzlers
Softcon.ph - Maven PuzzlersSoftcon.ph - Maven Puzzlers
Softcon.ph - Maven PuzzlersAndres Almiray
 
Oracle Database Ecosystem for Java Developers
Oracle Database Ecosystem for Java DevelopersOracle Database Ecosystem for Java Developers
Oracle Database Ecosystem for Java DevelopersAndres Almiray
 
JReleaser - Releasing at the speed of light
JReleaser - Releasing at the speed of lightJReleaser - Releasing at the speed of light
JReleaser - Releasing at the speed of lightAndres Almiray
 
Building modular applications with the Java Platform Module System and Layrry
Building modular applications with the Java Platform Module System and LayrryBuilding modular applications with the Java Platform Module System and Layrry
Building modular applications with the Java Platform Module System and LayrryAndres Almiray
 
Going Reactive with g rpc
Going Reactive with g rpcGoing Reactive with g rpc
Going Reactive with g rpcAndres Almiray
 
Building modular applications with JPMS and Layrry
Building modular applications with JPMS and LayrryBuilding modular applications with JPMS and Layrry
Building modular applications with JPMS and LayrryAndres Almiray
 
Taking Micronaut out for a spin
Taking Micronaut out for a spinTaking Micronaut out for a spin
Taking Micronaut out for a spinAndres Almiray
 
Apache Groovy's Metaprogramming Options and You
Apache Groovy's Metaprogramming Options and YouApache Groovy's Metaprogramming Options and You
Apache Groovy's Metaprogramming Options and YouAndres Almiray
 
What I wish I knew about Maven years ago
What I wish I knew about Maven years agoWhat I wish I knew about Maven years ago
What I wish I knew about Maven years agoAndres Almiray
 
What I wish I knew about maven years ago
What I wish I knew about maven years agoWhat I wish I knew about maven years ago
What I wish I knew about maven years agoAndres Almiray
 
The impact of sci fi in tech
The impact of sci fi in techThe impact of sci fi in tech
The impact of sci fi in techAndres Almiray
 
Interacting with the Oracle Cloud Java SDK with Gradle
Interacting with the Oracle Cloud Java SDK with GradleInteracting with the Oracle Cloud Java SDK with Gradle
Interacting with the Oracle Cloud Java SDK with GradleAndres Almiray
 
Going Reactive with gRPC
Going Reactive with gRPCGoing Reactive with gRPC
Going Reactive with gRPCAndres Almiray
 

More from Andres Almiray (20)

Creando, creciendo, y manteniendo una comunidad de codigo abierto
Creando, creciendo, y manteniendo una comunidad de codigo abiertoCreando, creciendo, y manteniendo una comunidad de codigo abierto
Creando, creciendo, y manteniendo una comunidad de codigo abierto
 
Liberando a produccion con confianza
Liberando a produccion con confianzaLiberando a produccion con confianza
Liberando a produccion con confianza
 
Liberando a produccion con confidencia
Liberando a produccion con confidenciaLiberando a produccion con confidencia
Liberando a produccion con confidencia
 
OracleDB Ecosystem for Java Developers
OracleDB Ecosystem for Java DevelopersOracleDB Ecosystem for Java Developers
OracleDB Ecosystem for Java Developers
 
Softcon.ph - Maven Puzzlers
Softcon.ph - Maven PuzzlersSoftcon.ph - Maven Puzzlers
Softcon.ph - Maven Puzzlers
 
Maven Puzzlers
Maven PuzzlersMaven Puzzlers
Maven Puzzlers
 
Oracle Database Ecosystem for Java Developers
Oracle Database Ecosystem for Java DevelopersOracle Database Ecosystem for Java Developers
Oracle Database Ecosystem for Java Developers
 
JReleaser - Releasing at the speed of light
JReleaser - Releasing at the speed of lightJReleaser - Releasing at the speed of light
JReleaser - Releasing at the speed of light
 
Building modular applications with the Java Platform Module System and Layrry
Building modular applications with the Java Platform Module System and LayrryBuilding modular applications with the Java Platform Module System and Layrry
Building modular applications with the Java Platform Module System and Layrry
 
Going Reactive with g rpc
Going Reactive with g rpcGoing Reactive with g rpc
Going Reactive with g rpc
 
Building modular applications with JPMS and Layrry
Building modular applications with JPMS and LayrryBuilding modular applications with JPMS and Layrry
Building modular applications with JPMS and Layrry
 
Taking Micronaut out for a spin
Taking Micronaut out for a spinTaking Micronaut out for a spin
Taking Micronaut out for a spin
 
Apache Groovy's Metaprogramming Options and You
Apache Groovy's Metaprogramming Options and YouApache Groovy's Metaprogramming Options and You
Apache Groovy's Metaprogramming Options and You
 
What I wish I knew about Maven years ago
What I wish I knew about Maven years agoWhat I wish I knew about Maven years ago
What I wish I knew about Maven years ago
 
What I wish I knew about maven years ago
What I wish I knew about maven years agoWhat I wish I knew about maven years ago
What I wish I knew about maven years ago
 
The impact of sci fi in tech
The impact of sci fi in techThe impact of sci fi in tech
The impact of sci fi in tech
 
Interacting with the Oracle Cloud Java SDK with Gradle
Interacting with the Oracle Cloud Java SDK with GradleInteracting with the Oracle Cloud Java SDK with Gradle
Interacting with the Oracle Cloud Java SDK with Gradle
 
Go Java, Go!
Go Java, Go!Go Java, Go!
Go Java, Go!
 
Going Reactive with gRPC
Going Reactive with gRPCGoing Reactive with gRPC
Going Reactive with gRPC
 
The JavaFX Ecosystem
The JavaFX EcosystemThe JavaFX Ecosystem
The JavaFX Ecosystem
 

Recently uploaded

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 

Recently uploaded (20)

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 

Gradle Ex Machina - Devoxx 2019

  • 1. Gradle Ex Machina Andres Almiray @aalmiray
  • 2.
  • 3. The preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, timing, and pricing of any features or functionality described for Oracle’s products may change and remains at the sole discretion of Oracle Corporation. Statements in this presentation relating to Oracle’s future plans, expectations, beliefs, intentions and prospects are “forward-looking statements” and are subject to material risks and uncertainties. A detailed discussion of these factors and other risks that affect our business is contained in Oracle’s Securities and Exchange Commission (SEC) filings, including our most recent reports on Form 10-K and Form 10- Q under the heading “Risk Factors.” These filings are available on the SEC’s website or on Oracle’s website at http://www.oracle.com/investor. All information in this presentation is current as of September 2019 and Oracle undertakes no duty to update any statement in light of new information or future events. Safe Harbor Copyright © 2019 Oracle and/or its affiliates.
  • 4.
  • 5. pom.xml • POM stands for Project Object Model. • A POM file defines both how a project should be built and how consumers may interact with the published artifacts. • Maven delivers lots of features out of the box thanks to the hierarchical nature of the POM. • The Maven Super POM provides default configuration for common plugins such as compiler, resources, surefire, etc. • The strict nature of the structure found in the POM allows anyone to understand the configuration.
  • 6.
  • 7. build.gradle • Gradle build files only specify how projects should be built. • The definition for consumers is delivered through a generated POM file. • Gradle builds are highly customizable, resulting in a wider range of build patterns.
  • 8. Can we have a maven-like structure on top of gradle?
  • 12. The project plugin plugins {
 id 'org.kordamp.gradle.project' version ‘0.29.0’ }
 
 config {
 release = (rootProject.findProperty('release') ?: false).toBoolean()
 
 info {
 name = 'Sample'
 vendor = 'Acme'
 description = 'Sample project'
 
 links {
 website = 'https://github.com/joecool/sample'
 issueTracker = 'https://github.com/joecool/sample/issues'
 scm = 'https://github.com/joecool/sample.git'
 }
 
 people {
 person {
 id = 'joecool'
 name = 'Joe Cool'
 roles = ['developer']
 }
 }
 } … }
  • 13. Provided behavior • The project plugin applies the following plugins org.kordamp.gradle.base org.kordamp.gradle.build-info org.kordamp.gradle.minpom org.kordamp.gradle.jar org.kordamp.gradle.source-jar org.kordamp.gradle.javadoc org.kordamp.gradle.license org.kordamp.gradle.jacoco org.kordamp.gradle.publishing org.kordamp.gradle.testing org.kordamp.gradle.apidoc org.kordamp.gradle.source-stats org.kordamp.gradle.source-html org.kordamp.gradle.bintray
  • 15. Default tasks • Gradle provides the following tasks projects dependencies properties tasks
  • 16. Additional tasks • The base plugin provides the following tasks extensions plugins repositories configurations repositories sourceSets projectProperties effectiveSettings java/groovy/scala compileSettings testSettings publicationSettings
  • 17. Demo
  • 18.
  • 19.
  • 20.
  • 21. Additional plugins • The following plugins can be applied explicitly org.kordamp.gradle.kotlindoc org.kordamp.gradle.scaladoc org.kordamp.gradle.source-xref org.kordamp.gradle.bom org.kordamp.gradle.clirr org.kordamp.gradle.guide org.kordamp.gradle.integration-test org.kordamp.gradle.functional-test
  • 23. The Maven super POM • POMs are hierarchical. • The chain resolves all the way to the top where you find the Maven Super POM. • Super POM configures lots of default & useful behavior.
  • 24. The Gradle super POM • Gradle does not offer this behavior out of the box. • But it can be “faked” using a custom plugin. • The plugin applies the default behavior that consuming projects require.
  • 27. Standard (gradle) . ├── build.gradle ├── guide │   └── build.gradle ├── project1 │   └── build.gradle ├── project2 │   └── build.gradle └── settings.gradle . ├── build.gradle ├── guide │   └── guide.gradle ├── project1 │   └── project1.gradle ├── project2 │   └── project2.gradle └── settings.gradle
  • 28. Standard (gradle) $ cat settings.gradle include 'guide' include 'project1' include 'project2' $ cat settings.gradle include 'guide' include 'project1' include 'project2’ project(':guide').buildFileName = 'guide.gradle' project(':project1').buildFileName = 'project1.gradle' project(':project2').buildFileName = 'project2.gradle'
  • 29. Standard (gradle) $ cat settings.gradle buildscript {
 repositories {
 gradlePluginPortal()
 }
 dependencies {
 classpath 'org.kordamp.gradle:settings-gradle-plugin:0.29.0
 }
 } 
 apply plugin: 'org.kordamp.gradle.settings'
 
 projects {
 layout = 'standard'
 }
  • 30. Two-level (gradle) . ├── build.gradle ├── docs │   └── guide │       └── build.gradle └── subprojects     ├── project1     │   └── build.gradle     └── project2         └── build.gradle . ├── build.gradle ├── docs │   └── guide │       └── guide.gradle └── subprojects     ├── project1     │   └── project1.gradle     └── project2         └── project2.gradle
  • 31. Two-level (gradle) $ cat settings.gradle include 'guide' include 'project1' include 'project2' project(':guide').projectDir = new File(“$settingsDir/docs/guide”) project(':project1').projectDir = new File(“$settingsDir/subprojects/project1”) project(':project2').projectDir = new File(“$settingsDir/subprojects/project2”) // update names if required project(':guide').buildFileName = 'guide.gradle' project(':project1').buildFileName = 'project1.gradle' project(':project2').buildFileName = 'project2.gradle'
  • 32. Two-level (gradle) $ cat settings.gradle buildscript {
 repositories {
 gradlePluginPortal()
 }
 dependencies {
 classpath 'org.kordamp.gradle:settings-gradle-plugin:0.29.0
 }
 } 
 apply plugin: 'org.kordamp.gradle.settings'
 
 projects {
 layout = 'two-level' directories = ['docs', 'subprojects']
 }
  • 33. Multi-level (gradle) . ├── build.gradle ├── guide │   └── build.gradle └── subprojects     ├── project1     │   └── build.gradle     └── project2         └── build.gradle . ├── build.gradle ├── guide │   └── guide.gradle └── subprojects     ├── project1     │   └── project1.gradle     └── project2         └── project2.gradle
  • 34. Multi-level (gradle) $ cat settings.gradle buildscript {
 repositories {
 gradlePluginPortal()
 }
 dependencies {
 classpath 'org.kordamp.gradle:settings-gradle-plugin:0.29.0
 }
 } 
 apply plugin: 'org.kordamp.gradle.settings'
 
 projects {
 layout = 'multi-level'
 directories = [
 'guide',
 'subprojects/project1',
 'subprojects/project2'
 ]
 }
  • 35.
  • 37.