SlideShare una empresa de Scribd logo
1 de 40
Descargar para leer sin conexión
Monday, October 25, 2010
Gradle
A Better Way To Build
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
3
About Hans Dockter
• Founder, Gradle
• CEO, Gradle Inc.
• Before Gradle:
o Trainer, Mentor, Consultant
for Enterprise Java.
o Senior Developer for Krugle and
Volkswagen.
• Prehistoric ;): Committer to JBoss and founder of
JBoss-IDE.
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
• A general purpose build system
• It comes with a Groovy DSL and a Java core.
• Provides build-in support for Java, Groovy, Scala,
Web, OSGi projects.
• Gradle provides exciting solutions for many of the
big pain points you often have with current builds.
– Maintainability
– Performance
– Usability
4
What is Gradle?
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
What is Gradle?
Gradle is declarative
You specify the WHAT
Gradle figures out the HOW
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Extensible
Build Language
instead of a
Build Framework
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
• Deep Configuration API
• Deep Execution API
• Rich API
• Extendable Domain Objects
• Custom Tasks
• Custom Plugins
7
Extending Gradle
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Custom Declarative Elements
usePlugin ʻeditionsʼ
productEditions {
enterprise core, plugins, powerAddons
public core, plugins, openApi
}
> gradle enterpriseEditionZip
> gradle publicEditionTar
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Gradle
is
declarative
without
being rigid
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
The Build Language
Source Sets
Dependencies
Configurations
Archives
Projects
Artifacts
Custom Tasks
Plugins
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
XML and the What
It does not matter much
whether a build system
uses XML or Groovy for
declaring things.
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Please
no
messy
build scripts
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
• Separate Imperative from Declarative
• Custom Tasks/Plugins
• BuildSrc
• Jar
13
Organizing Build Logic
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
14
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'commons-math:commons-math:1.1'
}
}
task math << {
org.apache.commons.math.fraction.Fraction lhs = new
org.apache.commons.math.fraction.Fraction(1, 3);
// do something
}
Build Script Libraries
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Performance
is one of the
biggest
pain points
of complex builds.
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Should clean be
required for a
reliable build?
(Hint: We have the
21st century)
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
• Incremental Build
• Parallel Testing
• Soon: Parallel Builds
• Not too distant future: Distributed testing/builds
• Rich Model
17
Speed Improvements
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Gradle is
a
Build
Integration
Tool
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
• Ant Tasks
• Deep import of Ant builds
• Retrieve/Deploy to Maven/Ivy repositories
• Autogeneration of pom.xml/ivy.xml
• Future: Deep import of Maven builds
19
Build Integration Features
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
• Mission Critical!
• Very expensive if the build system can’t adapt to the
existing project layout:
– Freeze
– Project automation not working for a while
– Different branches (unreliable, hard to compare, ...)
• Gradle’s suppleness enables baby steps.
– Gradle can adapt to any project layout.
– No separate branches
– Comparable --> You can write tests
20
Build Migration
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Dependency Management
• Transitive Dependencies
• Repository less dependencies are 1st class citizens.
• Excludes per configuration or dependency
• Very flexible repository handling
• Based on Apache Ivy
• Powerful API
• Much More ...
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Deep Integration with
Ant Builds
> gradle hello
Hello, from Gradle...Here comes Ant...
[ant:echo] Hello, from Ant
<project>
<target name="hello" depends="intro">
<echo>Hello, from Ant</echo>
</target>
</project>
ant.importBuild 'build.xml'
hello.doFirst { println 'Here comes Ant' }
task intro << { println 'Hello, from Gradle'}
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
• Supports Maven/Ant/Gradle with pom or ivy.
• Supports any repository layout
• Very advanced features
• Gradle Artifactory plugin
• Integrated in Gradle Hudson plugin.
• Gradle Inc. has business partnership with JFrog.
23
Build Eco System
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Process is very
important.
But it is all about
YOUR
process
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Their is
no one-size-fits-all
project structure
for the
enterprise.
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
The physical
structure of your
projects should be
determined by
your
requirements.
(What, if not?)
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Be as
rigid
as
YOU
want
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
FRAME-
WORKITIS
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
34
Fighting with a Framework
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Extensible
Build Language
instead of a
Build Framework
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Gradle Wrapper
>./gradlew assemble
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
• Very active community (mailing-list, patches, issues)
• Apache v2 license.
• Excellent user’s guide (200+ pages) + many samples
• Frequent releases, multiple commits per day
• Quality is king:
– 2800 unit tests, Many hundreds of integration test
– Healthy codebase
– low defect rate
• Commiter -> Steve Appling, Hans Dockter, Tom
Eyckmans, Adam Murdoch, Russel Winder
38
Project Background
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
39
Commercial Support: www.gradle.biz
Monday, October 25, 2010
SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.
Q&A
Monday, October 25, 2010

Más contenido relacionado

Similar a Uberconf 10

For every site a make file
For every site a make fileFor every site a make file
For every site a make fileDevelopment Seed
 
Boston Ruby Group - Devops Pipeline
Boston Ruby Group - Devops Pipeline Boston Ruby Group - Devops Pipeline
Boston Ruby Group - Devops Pipeline Michael Durrant
 
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
 
Off the Treadmill: Building a Drupal Platform for Your Organization
Off the Treadmill: Building a Drupal Platform for Your OrganizationOff the Treadmill: Building a Drupal Platform for Your Organization
Off the Treadmill: Building a Drupal Platform for Your OrganizationRick Vugteveen
 
Introduction into Drupal site building
Introduction into Drupal site buildingIntroduction into Drupal site building
Introduction into Drupal site buildingIztok Smolic
 
Open stack jobs avoiding the axe
Open stack jobs   avoiding the axeOpen stack jobs   avoiding the axe
Open stack jobs avoiding the axeJim Leitch
 
Lustre Community Release Update
Lustre Community Release UpdateLustre Community Release Update
Lustre Community Release Updateinside-BigData.com
 
Drupal 8 for site builders
Drupal 8 for site buildersDrupal 8 for site builders
Drupal 8 for site buildersswentel
 
OSMC 2008 | A large scale distributed Nagios installation for T-Systems Enter...
OSMC 2008 | A large scale distributed Nagios installation for T-Systems Enter...OSMC 2008 | A large scale distributed Nagios installation for T-Systems Enter...
OSMC 2008 | A large scale distributed Nagios installation for T-Systems Enter...NETWAYS
 
From Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDEFrom Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDEintelliyole
 
Continuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconf
Continuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconfContinuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconf
Continuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconfJulia Mateo
 
UberFire (JudCon 2013)
UberFire (JudCon 2013)UberFire (JudCon 2013)
UberFire (JudCon 2013)Mark Proctor
 
Intro to unity for as3
Intro to unity for as3Intro to unity for as3
Intro to unity for as3mrondina
 
[UniteKorea2013] Art tips and tricks
[UniteKorea2013] Art tips and tricks[UniteKorea2013] Art tips and tricks
[UniteKorea2013] Art tips and tricksWilliam Hugo Yang
 
PojoSR or OSGi (µ)Services For the Rest of Us
PojoSR or OSGi (µ)Services For the Rest of UsPojoSR or OSGi (µ)Services For the Rest of Us
PojoSR or OSGi (µ)Services For the Rest of UsOSGiUsers
 
Survey of Container Build Tools
Survey of Container Build ToolsSurvey of Container Build Tools
Survey of Container Build ToolsMichael Ducy
 

Similar a Uberconf 10 (20)

Html5 Apps
Html5 AppsHtml5 Apps
Html5 Apps
 
For every site a make file
For every site a make fileFor every site a make file
For every site a make file
 
Boston Ruby Group - Devops Pipeline
Boston Ruby Group - Devops Pipeline Boston Ruby Group - Devops Pipeline
Boston Ruby Group - Devops Pipeline
 
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
 
Off the Treadmill: Building a Drupal Platform for Your Organization
Off the Treadmill: Building a Drupal Platform for Your OrganizationOff the Treadmill: Building a Drupal Platform for Your Organization
Off the Treadmill: Building a Drupal Platform for Your Organization
 
Introduction into Drupal site building
Introduction into Drupal site buildingIntroduction into Drupal site building
Introduction into Drupal site building
 
Open stack jobs avoiding the axe
Open stack jobs   avoiding the axeOpen stack jobs   avoiding the axe
Open stack jobs avoiding the axe
 
Lustre Community Release Update
Lustre Community Release UpdateLustre Community Release Update
Lustre Community Release Update
 
Drupal 8 for site builders
Drupal 8 for site buildersDrupal 8 for site builders
Drupal 8 for site builders
 
OSMC 2008 | A large scale distributed Nagios installation for T-Systems Enter...
OSMC 2008 | A large scale distributed Nagios installation for T-Systems Enter...OSMC 2008 | A large scale distributed Nagios installation for T-Systems Enter...
OSMC 2008 | A large scale distributed Nagios installation for T-Systems Enter...
 
From Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDEFrom Renamer Plugin to Polyglot IDE
From Renamer Plugin to Polyglot IDE
 
Bilder "Implementation and the Role of Architects"
Bilder "Implementation and the Role of Architects"Bilder "Implementation and the Role of Architects"
Bilder "Implementation and the Role of Architects"
 
Stackato
StackatoStackato
Stackato
 
Continuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconf
Continuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconfContinuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconf
Continuous delivery with Jenkins, Docker and Mesos/Marathon - jbcnconf
 
UberFire (JudCon 2013)
UberFire (JudCon 2013)UberFire (JudCon 2013)
UberFire (JudCon 2013)
 
Intro to unity for as3
Intro to unity for as3Intro to unity for as3
Intro to unity for as3
 
[UniteKorea2013] Art tips and tricks
[UniteKorea2013] Art tips and tricks[UniteKorea2013] Art tips and tricks
[UniteKorea2013] Art tips and tricks
 
Cd syd
Cd sydCd syd
Cd syd
 
PojoSR or OSGi (µ)Services For the Rest of Us
PojoSR or OSGi (µ)Services For the Rest of UsPojoSR or OSGi (µ)Services For the Rest of Us
PojoSR or OSGi (µ)Services For the Rest of Us
 
Survey of Container Build Tools
Survey of Container Build ToolsSurvey of Container Build Tools
Survey of Container Build Tools
 

Más de Skills Matter

Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...Skills Matter
 
Cukeup nyc ian dees on elixir, erlang, and cucumberl
Cukeup nyc ian dees on elixir, erlang, and cucumberlCukeup nyc ian dees on elixir, erlang, and cucumberl
Cukeup nyc ian dees on elixir, erlang, and cucumberlSkills Matter
 
Cukeup nyc peter bell on getting started with cucumber.js
Cukeup nyc peter bell on getting started with cucumber.jsCukeup nyc peter bell on getting started with cucumber.js
Cukeup nyc peter bell on getting started with cucumber.jsSkills Matter
 
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...Skills Matter
 
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...Skills Matter
 
Progressive f# tutorials nyc don syme on keynote f# in the open source world
Progressive f# tutorials nyc don syme on keynote f# in the open source worldProgressive f# tutorials nyc don syme on keynote f# in the open source world
Progressive f# tutorials nyc don syme on keynote f# in the open source worldSkills Matter
 
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...Skills Matter
 
Dmitry mozorov on code quotations code as-data for f#
Dmitry mozorov on code quotations code as-data for f#Dmitry mozorov on code quotations code as-data for f#
Dmitry mozorov on code quotations code as-data for f#Skills Matter
 
A poet's guide_to_acceptance_testing
A poet's guide_to_acceptance_testingA poet's guide_to_acceptance_testing
A poet's guide_to_acceptance_testingSkills Matter
 
Russ miles-cloudfoundry-deep-dive
Russ miles-cloudfoundry-deep-diveRuss miles-cloudfoundry-deep-dive
Russ miles-cloudfoundry-deep-diveSkills Matter
 
Simon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSimon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSkills Matter
 
I went to_a_communications_workshop_and_they_t
I went to_a_communications_workshop_and_they_tI went to_a_communications_workshop_and_they_t
I went to_a_communications_workshop_and_they_tSkills Matter
 
Bootstrapping a-devops-matter
Bootstrapping a-devops-matterBootstrapping a-devops-matter
Bootstrapping a-devops-matterSkills Matter
 
Personal kanban-workshop
Personal kanban-workshopPersonal kanban-workshop
Personal kanban-workshopSkills Matter
 
Agilex retrospectives
Agilex retrospectivesAgilex retrospectives
Agilex retrospectivesSkills Matter
 

Más de Skills Matter (20)

Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
Progressive f# tutorials nyc dmitry mozorov & jack pappas on code quotations ...
 
Cukeup nyc ian dees on elixir, erlang, and cucumberl
Cukeup nyc ian dees on elixir, erlang, and cucumberlCukeup nyc ian dees on elixir, erlang, and cucumberl
Cukeup nyc ian dees on elixir, erlang, and cucumberl
 
Cukeup nyc peter bell on getting started with cucumber.js
Cukeup nyc peter bell on getting started with cucumber.jsCukeup nyc peter bell on getting started with cucumber.js
Cukeup nyc peter bell on getting started with cucumber.js
 
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
Agile testing & bdd e xchange nyc 2013 jeffrey davidson & lav pathak & sam ho...
 
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
Progressive f# tutorials nyc rachel reese & phil trelford on try f# from zero...
 
Progressive f# tutorials nyc don syme on keynote f# in the open source world
Progressive f# tutorials nyc don syme on keynote f# in the open source worldProgressive f# tutorials nyc don syme on keynote f# in the open source world
Progressive f# tutorials nyc don syme on keynote f# in the open source world
 
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
 
Dmitry mozorov on code quotations code as-data for f#
Dmitry mozorov on code quotations code as-data for f#Dmitry mozorov on code quotations code as-data for f#
Dmitry mozorov on code quotations code as-data for f#
 
A poet's guide_to_acceptance_testing
A poet's guide_to_acceptance_testingA poet's guide_to_acceptance_testing
A poet's guide_to_acceptance_testing
 
Russ miles-cloudfoundry-deep-dive
Russ miles-cloudfoundry-deep-diveRuss miles-cloudfoundry-deep-dive
Russ miles-cloudfoundry-deep-dive
 
Serendipity-neo4j
Serendipity-neo4jSerendipity-neo4j
Serendipity-neo4j
 
Simon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelismSimon Peyton Jones: Managing parallelism
Simon Peyton Jones: Managing parallelism
 
Plug 20110217
Plug   20110217Plug   20110217
Plug 20110217
 
Lug presentation
Lug presentationLug presentation
Lug presentation
 
I went to_a_communications_workshop_and_they_t
I went to_a_communications_workshop_and_they_tI went to_a_communications_workshop_and_they_t
I went to_a_communications_workshop_and_they_t
 
Plug saiku
Plug   saikuPlug   saiku
Plug saiku
 
Huguk lily
Huguk lilyHuguk lily
Huguk lily
 
Bootstrapping a-devops-matter
Bootstrapping a-devops-matterBootstrapping a-devops-matter
Bootstrapping a-devops-matter
 
Personal kanban-workshop
Personal kanban-workshopPersonal kanban-workshop
Personal kanban-workshop
 
Agilex retrospectives
Agilex retrospectivesAgilex retrospectives
Agilex retrospectives
 

Uberconf 10

  • 2. Gradle A Better Way To Build Monday, October 25, 2010
  • 3. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. 3 About Hans Dockter • Founder, Gradle • CEO, Gradle Inc. • Before Gradle: o Trainer, Mentor, Consultant for Enterprise Java. o Senior Developer for Krugle and Volkswagen. • Prehistoric ;): Committer to JBoss and founder of JBoss-IDE. Monday, October 25, 2010
  • 4. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. • A general purpose build system • It comes with a Groovy DSL and a Java core. • Provides build-in support for Java, Groovy, Scala, Web, OSGi projects. • Gradle provides exciting solutions for many of the big pain points you often have with current builds. – Maintainability – Performance – Usability 4 What is Gradle? Monday, October 25, 2010
  • 5. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. What is Gradle? Gradle is declarative You specify the WHAT Gradle figures out the HOW Monday, October 25, 2010
  • 6. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Extensible Build Language instead of a Build Framework Monday, October 25, 2010
  • 7. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. • Deep Configuration API • Deep Execution API • Rich API • Extendable Domain Objects • Custom Tasks • Custom Plugins 7 Extending Gradle Monday, October 25, 2010
  • 8. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Custom Declarative Elements usePlugin ʻeditionsʼ productEditions { enterprise core, plugins, powerAddons public core, plugins, openApi } > gradle enterpriseEditionZip > gradle publicEditionTar Monday, October 25, 2010
  • 9. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Gradle is declarative without being rigid Monday, October 25, 2010
  • 10. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. The Build Language Source Sets Dependencies Configurations Archives Projects Artifacts Custom Tasks Plugins Monday, October 25, 2010
  • 11. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. XML and the What It does not matter much whether a build system uses XML or Groovy for declaring things. Monday, October 25, 2010
  • 12. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Please no messy build scripts Monday, October 25, 2010
  • 13. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. • Separate Imperative from Declarative • Custom Tasks/Plugins • BuildSrc • Jar 13 Organizing Build Logic Monday, October 25, 2010
  • 14. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. 14 buildscript { repositories { mavenCentral() } dependencies { classpath 'commons-math:commons-math:1.1' } } task math << { org.apache.commons.math.fraction.Fraction lhs = new org.apache.commons.math.fraction.Fraction(1, 3); // do something } Build Script Libraries Monday, October 25, 2010
  • 15. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Performance is one of the biggest pain points of complex builds. Monday, October 25, 2010
  • 16. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Should clean be required for a reliable build? (Hint: We have the 21st century) Monday, October 25, 2010
  • 17. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. • Incremental Build • Parallel Testing • Soon: Parallel Builds • Not too distant future: Distributed testing/builds • Rich Model 17 Speed Improvements Monday, October 25, 2010
  • 18. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Gradle is a Build Integration Tool Monday, October 25, 2010
  • 19. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. • Ant Tasks • Deep import of Ant builds • Retrieve/Deploy to Maven/Ivy repositories • Autogeneration of pom.xml/ivy.xml • Future: Deep import of Maven builds 19 Build Integration Features Monday, October 25, 2010
  • 20. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. • Mission Critical! • Very expensive if the build system can’t adapt to the existing project layout: – Freeze – Project automation not working for a while – Different branches (unreliable, hard to compare, ...) • Gradle’s suppleness enables baby steps. – Gradle can adapt to any project layout. – No separate branches – Comparable --> You can write tests 20 Build Migration Monday, October 25, 2010
  • 21. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Dependency Management • Transitive Dependencies • Repository less dependencies are 1st class citizens. • Excludes per configuration or dependency • Very flexible repository handling • Based on Apache Ivy • Powerful API • Much More ... Monday, October 25, 2010
  • 22. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Deep Integration with Ant Builds > gradle hello Hello, from Gradle...Here comes Ant... [ant:echo] Hello, from Ant <project> <target name="hello" depends="intro"> <echo>Hello, from Ant</echo> </target> </project> ant.importBuild 'build.xml' hello.doFirst { println 'Here comes Ant' } task intro << { println 'Hello, from Gradle'} Monday, October 25, 2010
  • 23. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. • Supports Maven/Ant/Gradle with pom or ivy. • Supports any repository layout • Very advanced features • Gradle Artifactory plugin • Integrated in Gradle Hudson plugin. • Gradle Inc. has business partnership with JFrog. 23 Build Eco System Monday, October 25, 2010
  • 24. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Monday, October 25, 2010
  • 25. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Monday, October 25, 2010
  • 26. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Monday, October 25, 2010
  • 27. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Monday, October 25, 2010
  • 28. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Monday, October 25, 2010
  • 29. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Process is very important. But it is all about YOUR process Monday, October 25, 2010
  • 30. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Their is no one-size-fits-all project structure for the enterprise. Monday, October 25, 2010
  • 31. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. The physical structure of your projects should be determined by your requirements. (What, if not?) Monday, October 25, 2010
  • 32. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Be as rigid as YOU want Monday, October 25, 2010
  • 33. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. FRAME- WORKITIS Monday, October 25, 2010
  • 34. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. 34 Fighting with a Framework Monday, October 25, 2010
  • 35. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Monday, October 25, 2010
  • 36. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission.SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Extensible Build Language instead of a Build Framework Monday, October 25, 2010
  • 37. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Gradle Wrapper >./gradlew assemble Monday, October 25, 2010
  • 38. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. • Very active community (mailing-list, patches, issues) • Apache v2 license. • Excellent user’s guide (200+ pages) + many samples • Frequent releases, multiple commits per day • Quality is king: – 2800 unit tests, Many hundreds of integration test – Healthy codebase – low defect rate • Commiter -> Steve Appling, Hans Dockter, Tom Eyckmans, Adam Murdoch, Russel Winder 38 Project Background Monday, October 25, 2010
  • 39. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. 39 Commercial Support: www.gradle.biz Monday, October 25, 2010
  • 40. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Q&A Monday, October 25, 2010