Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Uberconf 10

on

  • 1,107 views

 

Statistics

Views

Total Views
1,107
Views on SlideShare
1,052
Embed Views
55

Actions

Likes
0
Downloads
3
Comments
0

3 Embeds 55

http://skillsmatter.com 47
http://smash 6
http://192.168.56.101 2

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Uberconf 10 Uberconf 10 Presentation Transcript

    • Monday, October 25, 2010
    • Gradle A Better Way To Build Monday, October 25, 2010
    • 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. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. 3 Monday, October 25, 2010
    • What is Gradle? • 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 SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. 4 Monday, October 25, 2010
    • What is Gradle? Gradle is declarative You specify the WHAT Gradle figures out the HOW SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Monday, October 25, 2010
    • Extensible Build Language instead of a Build Framework SpringOne 2GX 2GX 2009. All rights reserved. Dodistribute without permission. SpringOne 2009. All rights reserved. Do not not distribute without permission. Monday, October 25, 2010
    • Extending Gradle • Deep Configuration API • Deep Execution API • Rich API • Extendable Domain Objects • Custom Tasks • Custom Plugins SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. 7 Monday, October 25, 2010
    • Custom Declarative Elements usePlugin ʻeditionsʼ productEditions { enterprise core, plugins, powerAddons public core, plugins, openApi } > gradle enterpriseEditionZip > gradle publicEditionTar SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Monday, October 25, 2010
    • Gradle is declarative without being rigid SpringOne 2GX 2GX 2009. All rights reserved. Dodistribute without permission. SpringOne 2009. All rights reserved. Do not not distribute without permission. Monday, October 25, 2010
    • The Build Language Source Sets Custom Tasks Archives Dependencies Artifacts Projects Configurations Plugins SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Monday, October 25, 2010
    • XML and the What It does not matter much whether a build system uses XML or Groovy for declaring things. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Monday, October 25, 2010
    • Please no messy build scripts SpringOne 2GX 2GX 2009. All rights reserved. Dodistribute without permission. SpringOne 2009. All rights reserved. Do not not distribute without permission. Monday, October 25, 2010
    • Organizing Build Logic • Separate Imperative from Declarative • Custom Tasks/Plugins • BuildSrc • Jar SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. 13 Monday, October 25, 2010
    • Build Script Libraries 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 } SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. 14 Monday, October 25, 2010
    • Performance is one of the biggest pain points of complex builds. SpringOne 2GX 2GX 2009. All rights reserved. Dodistribute without permission. SpringOne 2009. All rights reserved. Do not not distribute without permission. Monday, October 25, 2010
    • Should clean be required for a reliable build? (Hint: We have the 21st century) SpringOne 2GX 2GX 2009. All rights reserved. Dodistribute without permission. SpringOne 2009. All rights reserved. Do not not distribute without permission. Monday, October 25, 2010
    • Speed Improvements • Incremental Build • Parallel Testing • Soon: Parallel Builds • Not too distant future: Distributed testing/builds • Rich Model SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. 17 Monday, October 25, 2010
    • Gradle is a Build Integration Tool SpringOne 2GX 2GX 2009. All rights reserved. Dodistribute without permission. SpringOne 2009. All rights reserved. Do not not distribute without permission. Monday, October 25, 2010
    • Build Integration Features • 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 SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. 19 Monday, October 25, 2010
    • Build Migration • 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 SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. 20 Monday, October 25, 2010
    • 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 ... SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Monday, October 25, 2010
    • Deep Integration with Ant Builds <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'} > gradle hello Hello, from Gradle...Here comes Ant... [ant:echo] Hello, from Ant SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Monday, October 25, 2010
    • Build Eco System • 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. SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. 23 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
    • Process is very important. But it is all about YOUR process SpringOne 2GX 2GX 2009. All rights reserved. Dodistribute without permission. SpringOne 2009. All rights reserved. Do not not distribute without permission. Monday, October 25, 2010
    • Their is no one-size-fits-all project structure for the enterprise. SpringOne 2GX 2GX 2009. All rights reserved. Dodistribute without permission. SpringOne 2009. All rights reserved. Do not not distribute without permission. Monday, October 25, 2010
    • The physical structure of your projects should be determined by your requirements. (What, if not?) SpringOne 2GX 2GX 2009. All rights reserved. Dodistribute without permission. SpringOne 2009. All rights reserved. Do not not distribute without permission. Monday, October 25, 2010
    • Be as rigid as YOU want SpringOne 2GX 2GX 2009. All rights reserved. Dodistribute without permission. SpringOne 2009. All rights reserved. Do not not distribute without permission. Monday, October 25, 2010
    • FRAME- WORKITIS SpringOne 2GX 2GX 2009. All rights reserved. Dodistribute without permission. SpringOne 2009. All rights reserved. Do not not distribute without permission. Monday, October 25, 2010
    • Fighting with a Framework SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. 34 Monday, October 25, 2010
    • SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Monday, October 25, 2010
    • Extensible Build Language instead of a Build Framework SpringOne 2GX 2GX 2009. All rights reserved. Dodistribute without permission. SpringOne 2009. All rights reserved. Do not not distribute without permission. Monday, October 25, 2010
    • Gradle Wrapper >./gradlew assemble SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Monday, October 25, 2010
    • Project Background • 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 SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. 38 Monday, October 25, 2010
    • Commercial Support: www.gradle.biz SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. 39 Monday, October 25, 2010
    • Q&A SpringOne 2GX 2009. All rights reserved. Do not distribute without permission. Monday, October 25, 2010