Migrating 25K lines of Ant scripting to Gradle

Migrating 25K lines of Ant scripting to Gradle
Who is this guy?
Migrating 25K lines of Ant scripting to Gradle
Migrating 25K lines of Ant scripting to Gradle
Migrating 25K lines of Ant scripting to Gradle
Migrating 25K lines of Ant scripting to Gradle
We will consult these 3 experts
Linus Torvalds
creator of Linux & Git
We will consult these 3 experts
Linus Torvalds Mark Reinhold
creator of Linux & Git Java's chief architect
We will consult these 3 experts
Linus Torvalds Mark Reinhold Louis van Gaal
creator of Linux & Git Java's chief architect manager of
Manchester United
We will consult these 3 experts
Linus Torvalds Mark Reinhold Louis van Gaal
creator of Linux & Git Java's chief architect former manager of
Manchester United
Changes in
requirements
Changes in requirements
Past
compiling
packaging
Changes in requirements
Present
one project, multiple programming languages
compiling
running automated tests
packaging
integrating code as early as possible
deploying software to TAP
Defining builds in
XML
XML
Let's start by being nice:
excels at expressing hierarchical data
XML
Let's start by being nice:
excels at expressing hierarchical data
but...
build scripting logic doesn't easily fit a hierarchy
often it consists of conditional and repeating logic
which can be expressed more concisely in a programming
language
What does Linus think of XML?
What does Linus think of XML?
( )
XML is crap. Really. There are no excuses.
XML is nasty to parse for humans, and it's a
disaster to parse even for computers. There's
just no reason for that horrible crap to exist.
https://plus.google.com/+LinusTorvalds/posts/X2XVf9Q7MfV
Build tools:
head to head
Ant vs. Maven according to Mark
Ant vs. Maven according to Mark
( )
What's the difference between Ant and
Maven?
https://www.parleys.com/tutorial/devoxx-fireside-chat
Ant vs. Maven according to Mark
( )
What's the difference between Ant and
Maven? The creator of Ant has apologized.
https://www.parleys.com/tutorial/devoxx-fireside-chat
Build tools head-to-head
Ant Maven Gradle
Build tools head-to-head
Ant Maven Gradle
build script format XML XML Groovy / DSL
Build tools head-to-head
Ant Maven Gradle
build script format XML XML Groovy / DSL
dependencies with Ivy built-in built-in
Build tools head-to-head
Ant Maven Gradle
build script format XML XML Groovy / DSL
dependencies with Ivy built-in built-in
multi-module builds complex simple simple
Build tools head-to-head
Ant Maven Gradle
build script format XML XML Groovy / DSL
dependencies with Ivy built-in built-in
multi-module builds complex simple simple
pre-defined structure absent present present
Build tools head-to-head
Ant Maven Gradle
build script format XML XML Groovy / DSL
dependencies with Ivy built-in built-in
multi-module builds complex simple simple
pre-defined structure absent present present
custom structure n/a complex simple
Build tools head-to-head
Ant Maven Gradle
build script format XML XML Groovy / DSL
dependencies with Ivy built-in built-in
multi-module builds complex simple simple
pre-defined structure absent present present
custom structure n/a complex simple
verbosity high average low
Build tools head-to-head
Ant Maven Gradle
build script format XML XML Groovy / DSL
dependencies with Ivy built-in built-in
multi-module builds complex simple simple
pre-defined structure absent present present
custom structure n/a complex simple
verbosity high average low
learning curve shallow steep average
Build tools head-to-head
Ant Maven Gradle
build script format XML XML Groovy / DSL
dependencies with Ivy built-in built-in
multi-module builds complex simple simple
pre-defined structure absent present present
custom structure n/a complex simple
verbosity high average low
learning curve shallow steep average
build order depends-on lifecycles directed acyclic graph
Gradle at NS
(Dutch Railways)
Gradle at NS (Dutch Railways)
not at all a 'greenfield project'!
1 million lines of code
over 25,000 lines of Ant scripting
30 software developers
system behaves like a monolith
Migration strategy
Migration strategy
divide the project into components according to
functionality
start Gradling at a small, isolated part
focus on code that is used regularly (i.e. on a daily basis)
Migration strategy
divide the project into components according to
functionality
start Gradling at a small, isolated part
focus on code that is used regularly (i.e. on a daily basis)
verify after each step that:
results are exactly the same as before
no problems occur in existing Ant code
Migration strategy
divide the project into components according to
functionality
start Gradling at a small, isolated part
focus on code that is used regularly (i.e. on a daily basis)
verify after each step that:
results are exactly the same as before
no problems occur in existing Ant code
don't fool yourself: not every single line of Ant code should
be replaced
Ant projects are 'first class citizens'
Challenges
dependency spaghetti
collaboration with existing Ant code
continuous integration & delivery
Migration result
a component's responsibility has become clearer
a build will only run if the particular component has
changed
run unit test in parallel (Gradle decides when)
dependencies behave transitively
Migration result (lines of code)
Language Lines of code (before) Lines of code (after)
Ant over 25,000 about 15,000
Gradle 0 1,232
What does Louis think of migrating all Ant
code?
What does Louis think of migrating all Ant
code?
( )
In the Netherlands they say: "That is another
cook."
https://youtu.be/x-QRqOndbzw
Wrap-up
Wrap-up
Wrap-up
Ant & Maven:
require hard-to-maintain code
the purpose of a code fragment is not clearly evident
Wrap-up
Ant & Maven:
require hard-to-maintain code
the purpose of a code fragment is not clearly evident
often fail to address changing requirements
rely heavily on XML
Wrap-up
Ant & Maven:
require hard-to-maintain code
the purpose of a code fragment is not clearly evident
often fail to address changing requirements
rely heavily on XML
Gradle is a better alternative
Wrap-up (2)
Gradle offers structure and flexibility
tries to combine the power of Ant and Maven
integrates with (almost) anything
Wrap-up (3)
So no drawbacks whatsoever?
Wrap-up (3)
So no drawbacks whatsoever?
Gradle spends a lot of time on configuration parsing (but
this has steadily improved in the past year)
developers need to get used to it
migrating existing scripting is a lot of work
Should my project use Gradle?
A brand-new project?
Should my project use Gradle?
A brand-new project?
just do it
Should my project use Gradle?
A brand-new project?
just do it
do it RIGHT NOW
Should my project use Gradle?
An existing project?
Should my project use Gradle?
An existing project?
Will you benefit from Gradles key features? (better
performance, maintainability, less verbose, ...)
Should my project use Gradle?
An existing project?
Will you benefit from Gradles key features? (better
performance, maintainability, less verbose, ...)
Any technical debt to solve?
Should my project use Gradle?
An existing project?
Will you benefit from Gradles key features? (better
performance, maintainability, less verbose, ...)
Any technical debt to solve?
use an artifact repository and remove duplicates
divide your project into multiple components
define a clear structure in your build logic
Any questions?
Further reading
"Why Build Your Java Projects with Gradle Rather than Ant
or Maven?"
by Benjamin Muschko
( )
Gradle User Guide
( )
Gradle Build Language Reference
( )
http://www.drdobbs.com/jvm/why-build-your-java-projects-with-gradle/240168608
http://gradle.org/docs/current/userguide/userguide.html
http://gradle.org/docs/current/dsl/index.html
Thank you :)
You can contact me at:
@hannotify
hanno.embregts@infosupport.com
1 of 60

Recommended

Building a Spring Boot Application - Ask the Audience! (from JavaLand 2017) by
Building a Spring Boot Application - Ask the Audience!  (from JavaLand 2017)Building a Spring Boot Application - Ask the Audience!  (from JavaLand 2017)
Building a Spring Boot Application - Ask the Audience! (from JavaLand 2017)🎤 Hanno Embregts 🎸
738 views22 slides
Building a Spring Boot Application - Ask the Audience! by
Building a Spring Boot Application - Ask the Audience!Building a Spring Boot Application - Ask the Audience!
Building a Spring Boot Application - Ask the Audience!🎤 Hanno Embregts 🎸
917 views21 slides
Spring Boot by
Spring BootSpring Boot
Spring Bootkoppenolski
365 views15 slides
Connecting Connect with Spring Boot by
Connecting Connect with Spring BootConnecting Connect with Spring Boot
Connecting Connect with Spring BootVincent Kok
1.1K views109 slides
Spring Boot by
Spring BootSpring Boot
Spring BootJaran Flaath
545 views51 slides
Springboot and camel by
Springboot and camelSpringboot and camel
Springboot and camelDeepak Kumar
355 views7 slides

More Related Content

What's hot

SpringBoot by
SpringBootSpringBoot
SpringBootJaran Flaath
401 views49 slides
Spring boot introduction by
Spring boot introductionSpring boot introduction
Spring boot introductionRasheed Waraich
7.7K views36 slides
Spring boot by
Spring bootSpring boot
Spring bootGyanendra Yadav
1.9K views32 slides
Introduction to Spring Boot! by
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!Jakub Kubrynski
6.4K views28 slides
Spring boot by
Spring bootSpring boot
Spring bootPradeep Shanmugam
649 views12 slides
Using JHipster 4 for generating Angular/Spring Boot apps by
Using JHipster 4 for generating Angular/Spring Boot appsUsing JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot appsYakov Fain
3.6K views35 slides

What's hot(20)

Using JHipster 4 for generating Angular/Spring Boot apps by Yakov Fain
Using JHipster 4 for generating Angular/Spring Boot appsUsing JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot apps
Yakov Fain3.6K views
Java and services code lab spring boot and spring data using mongo db by Staples
Java and services code lab spring boot and spring data using mongo dbJava and services code lab spring boot and spring data using mongo db
Java and services code lab spring boot and spring data using mongo db
Staples228 views
Angular 2 for Java Developers by Yakov Fain
Angular 2 for Java DevelopersAngular 2 for Java Developers
Angular 2 for Java Developers
Yakov Fain25.9K views
Apache ANT vs Apache Maven by Mudit Gupta
Apache ANT vs Apache MavenApache ANT vs Apache Maven
Apache ANT vs Apache Maven
Mudit Gupta1.3K views
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017 by Matt Raible
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
Matt Raible771 views
Intro JavaScript by koppenolski
Intro JavaScriptIntro JavaScript
Intro JavaScript
koppenolski122 views
Midwest PHP 2017 DevOps For Small team by Joe Ferguson
Midwest PHP 2017 DevOps For Small teamMidwest PHP 2017 DevOps For Small team
Midwest PHP 2017 DevOps For Small team
Joe Ferguson540 views
Using JHipster for generating Angular/Spring Boot apps by Yakov Fain
Using JHipster for generating Angular/Spring Boot appsUsing JHipster for generating Angular/Spring Boot apps
Using JHipster for generating Angular/Spring Boot apps
Yakov Fain1.8K views
Using JHipster for generating Angular/Spring Boot apps by Yakov Fain
Using JHipster for generating Angular/Spring Boot appsUsing JHipster for generating Angular/Spring Boot apps
Using JHipster for generating Angular/Spring Boot apps
Yakov Fain1.5K views
Spring IO '15 - Developing microservices, Spring Boot or Grails? by Fátima Casaú Pérez
Spring IO '15 - Developing microservices, Spring Boot or Grails?Spring IO '15 - Developing microservices, Spring Boot or Grails?
Spring IO '15 - Developing microservices, Spring Boot or Grails?
No Va Taig April 7 2010 by rudy regner
No Va Taig April 7 2010No Va Taig April 7 2010
No Va Taig April 7 2010
rudy regner622 views
Integration Testing With Cucumber How To Test Anything J A O O 2009 by Dr Nic Williams
Integration Testing With  Cucumber    How To Test Anything    J A O O 2009Integration Testing With  Cucumber    How To Test Anything    J A O O 2009
Integration Testing With Cucumber How To Test Anything J A O O 2009
Dr Nic Williams4K views

Similar to Migrating 25K lines of Ant scripting to Gradle

The Ember.js Framework - Everything You Need To Know by
The Ember.js Framework - Everything You Need To KnowThe Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To KnowAll Things Open
1.6K views69 slides
Gradle(the innovation continues) by
Gradle(the innovation continues)Gradle(the innovation continues)
Gradle(the innovation continues)Sejong Park
1.2K views34 slides
Enterprise build tool gradle by
Enterprise build tool gradleEnterprise build tool gradle
Enterprise build tool gradleDeepak Shevani
368 views23 slides
Preparing for Scala 3 by
Preparing for Scala 3Preparing for Scala 3
Preparing for Scala 3Martin Odersky
11.1K views48 slides
Boilerplates: Step up your Web Development Process by
Boilerplates: Step up your Web Development ProcessBoilerplates: Step up your Web Development Process
Boilerplates: Step up your Web Development ProcessFibonalabs
55 views20 slides
ReactJS or Angular by
ReactJS or AngularReactJS or Angular
ReactJS or Angularboyney123
5.7K views16 slides

Similar to Migrating 25K lines of Ant scripting to Gradle(20)

The Ember.js Framework - Everything You Need To Know by All Things Open
The Ember.js Framework - Everything You Need To KnowThe Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To Know
All Things Open1.6K views
Gradle(the innovation continues) by Sejong Park
Gradle(the innovation continues)Gradle(the innovation continues)
Gradle(the innovation continues)
Sejong Park1.2K views
Enterprise build tool gradle by Deepak Shevani
Enterprise build tool gradleEnterprise build tool gradle
Enterprise build tool gradle
Deepak Shevani368 views
Boilerplates: Step up your Web Development Process by Fibonalabs
Boilerplates: Step up your Web Development ProcessBoilerplates: Step up your Web Development Process
Boilerplates: Step up your Web Development Process
Fibonalabs55 views
ReactJS or Angular by boyney123
ReactJS or AngularReactJS or Angular
ReactJS or Angular
boyney1235.7K views
Introduction to webpack and babel by AmanRaj378
Introduction to webpack and babelIntroduction to webpack and babel
Introduction to webpack and babel
AmanRaj37858 views
Grails at DMC Digital by tomaslin
Grails at DMC DigitalGrails at DMC Digital
Grails at DMC Digital
tomaslin674 views
The ultimate cheat sheet on .net core, .net framework, and .net standard by Concetto Labs
The ultimate cheat sheet on .net core, .net framework, and .net standardThe ultimate cheat sheet on .net core, .net framework, and .net standard
The ultimate cheat sheet on .net core, .net framework, and .net standard
Concetto Labs100 views
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain... by Maarten Balliauw
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
Maarten Balliauw1.2K views
Performance monitoring and call tracing in microservice environments by Martin Gutenbrunner
Performance monitoring and call tracing in microservice environmentsPerformance monitoring and call tracing in microservice environments
Performance monitoring and call tracing in microservice environments
Martin Gutenbrunner2.4K views
Angular 2 vs React. What to chose in 2017? by TechMagic
Angular 2 vs React. What to chose in 2017?Angular 2 vs React. What to chose in 2017?
Angular 2 vs React. What to chose in 2017?
TechMagic2.9K views
10 Tips for Configuring Your Builds with Bamboo Specs by Atlassian
10 Tips for Configuring Your Builds with Bamboo Specs10 Tips for Configuring Your Builds with Bamboo Specs
10 Tips for Configuring Your Builds with Bamboo Specs
Atlassian20.2K views
What Web Framework To Use? by Kasra Khosravi
What Web Framework To Use?What Web Framework To Use?
What Web Framework To Use?
Kasra Khosravi1.1K views
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain... by Maarten Balliauw
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
Maarten Balliauw326 views
Evolving your api architecture with the strangler pattern by dwcarter74
Evolving your api architecture with the strangler patternEvolving your api architecture with the strangler pattern
Evolving your api architecture with the strangler pattern
dwcarter74138 views
Continuous integration and delivery for java based web applications by Sunil Dalal
Continuous integration and delivery for java based web applicationsContinuous integration and delivery for java based web applications
Continuous integration and delivery for java based web applications
Sunil Dalal1.3K views
Practical WebAssembly with Apex, wasmRS, and nanobus by Jarrod Overson
Practical WebAssembly with Apex, wasmRS, and nanobusPractical WebAssembly with Apex, wasmRS, and nanobus
Practical WebAssembly with Apex, wasmRS, and nanobus
Jarrod Overson55 views
The Development History of PVS-Studio for Linux by PVS-Studio
The Development History of PVS-Studio for LinuxThe Development History of PVS-Studio for Linux
The Development History of PVS-Studio for Linux
PVS-Studio117 views

More from 🎤 Hanno Embregts 🎸

Pattern Matching: Small Enhancement or Major Feature? by
Pattern Matching: Small Enhancement or Major Feature?Pattern Matching: Small Enhancement or Major Feature?
Pattern Matching: Small Enhancement or Major Feature?🎤 Hanno Embregts 🎸
23 views109 slides
Pattern Matching - Small Enhancement or Major Feature? from Developer Week 202 by
Pattern Matching - Small Enhancement or Major Feature? from Developer Week 202Pattern Matching - Small Enhancement or Major Feature? from Developer Week 202
Pattern Matching - Small Enhancement or Major Feature? from Developer Week 202🎤 Hanno Embregts 🎸
4 views108 slides
"Will Git Be Around Forever? A List of Possible Successors" from Devoxx 2022 by
"Will Git Be Around Forever? A List of Possible Successors" from Devoxx 2022"Will Git Be Around Forever? A List of Possible Successors" from Devoxx 2022
"Will Git Be Around Forever? A List of Possible Successors" from Devoxx 2022🎤 Hanno Embregts 🎸
7 views35 slides
"Will Git Be Around Forever? A List of Possible Successors" from FrontMania 2022 by
"Will Git Be Around Forever? A List of Possible Successors" from FrontMania 2022"Will Git Be Around Forever? A List of Possible Successors" from FrontMania 2022
"Will Git Be Around Forever? A List of Possible Successors" from FrontMania 2022🎤 Hanno Embregts 🎸
5 views61 slides
Pattern Matching: Small Enhancement or Major Feature? by
Pattern Matching: Small Enhancement or Major Feature?Pattern Matching: Small Enhancement or Major Feature?
Pattern Matching: Small Enhancement or Major Feature?🎤 Hanno Embregts 🎸
75 views103 slides
JCON 2021 talk - "Wil Git Be Around Forever? A List of Possible Successors" by
JCON 2021 talk - "Wil Git Be Around Forever? A List of Possible Successors"JCON 2021 talk - "Wil Git Be Around Forever? A List of Possible Successors"
JCON 2021 talk - "Wil Git Be Around Forever? A List of Possible Successors"🎤 Hanno Embregts 🎸
62 views62 slides

More from 🎤 Hanno Embregts 🎸(18)

Pattern Matching - Small Enhancement or Major Feature? from Developer Week 202 by 🎤 Hanno Embregts 🎸
Pattern Matching - Small Enhancement or Major Feature? from Developer Week 202Pattern Matching - Small Enhancement or Major Feature? from Developer Week 202
Pattern Matching - Small Enhancement or Major Feature? from Developer Week 202
"Will Git Be Around Forever? A List of Possible Successors" from Devoxx 2022 by 🎤 Hanno Embregts 🎸
"Will Git Be Around Forever? A List of Possible Successors" from Devoxx 2022"Will Git Be Around Forever? A List of Possible Successors" from Devoxx 2022
"Will Git Be Around Forever? A List of Possible Successors" from Devoxx 2022
"Will Git Be Around Forever? A List of Possible Successors" from FrontMania 2022 by 🎤 Hanno Embregts 🎸
"Will Git Be Around Forever? A List of Possible Successors" from FrontMania 2022"Will Git Be Around Forever? A List of Possible Successors" from FrontMania 2022
"Will Git Be Around Forever? A List of Possible Successors" from FrontMania 2022
JCON 2021 talk - "Wil Git Be Around Forever? A List of Possible Successors" by 🎤 Hanno Embregts 🎸
JCON 2021 talk - "Wil Git Be Around Forever? A List of Possible Successors"JCON 2021 talk - "Wil Git Be Around Forever? A List of Possible Successors"
JCON 2021 talk - "Wil Git Be Around Forever? A List of Possible Successors"
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG by 🎤 Hanno Embregts 🎸
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG
"Will Git Be Around Forever? A List of Possible Successors" at UtrechtJUG
Pattern Matching: Small Enhancement or Major Feature? (talk from jLove 2021) by 🎤 Hanno Embregts 🎸
Pattern Matching: Small Enhancement or Major Feature? (talk from jLove 2021)Pattern Matching: Small Enhancement or Major Feature? (talk from jLove 2021)
Pattern Matching: Small Enhancement or Major Feature? (talk from jLove 2021)
Pattern Matching: From Small Enhancement to Major Feature (talk from JavaLand... by 🎤 Hanno Embregts 🎸
Pattern Matching: From Small Enhancement to Major Feature (talk from JavaLand...Pattern Matching: From Small Enhancement to Major Feature (talk from JavaLand...
Pattern Matching: From Small Enhancement to Major Feature (talk from JavaLand...
Entering the Fourth Dimension of OCR with Tesseract - Talk from Voxxed Days B... by 🎤 Hanno Embregts 🎸
Entering the Fourth Dimension of OCR with Tesseract - Talk from Voxxed Days B...Entering the Fourth Dimension of OCR with Tesseract - Talk from Voxxed Days B...
Entering the Fourth Dimension of OCR with Tesseract - Talk from Voxxed Days B...
QWERTY or DVORAK? Debunking the Keyboard Layout Myths -- from GeeCON 2018 by 🎤 Hanno Embregts 🎸
QWERTY or DVORAK? Debunking the Keyboard Layout Myths -- from GeeCON 2018QWERTY or DVORAK? Debunking the Keyboard Layout Myths -- from GeeCON 2018
QWERTY or DVORAK? Debunking the Keyboard Layout Myths -- from GeeCON 2018
Building a Spring Boot 2 Application - Ask the Audience! (from Voxxed Days Vi... by 🎤 Hanno Embregts 🎸
Building a Spring Boot 2 Application - Ask the Audience! (from Voxxed Days Vi...Building a Spring Boot 2 Application - Ask the Audience! (from Voxxed Days Vi...
Building a Spring Boot 2 Application - Ask the Audience! (from Voxxed Days Vi...
Building a Spring Boot Application - Ask the Audience! (from JVMCon 2018) by 🎤 Hanno Embregts 🎸
Building a Spring Boot Application - Ask the Audience! (from JVMCon 2018)Building a Spring Boot Application - Ask the Audience! (from JVMCon 2018)
Building a Spring Boot Application - Ask the Audience! (from JVMCon 2018)

Recently uploaded

Flask-Python by
Flask-PythonFlask-Python
Flask-PythonTriloki Gupta
10 views12 slides
How to build dyanmic dashboards and ensure they always work by
How to build dyanmic dashboards and ensure they always workHow to build dyanmic dashboards and ensure they always work
How to build dyanmic dashboards and ensure they always workWiiisdom
16 views13 slides
Quality Assurance by
Quality Assurance Quality Assurance
Quality Assurance interworksoftware2
8 views6 slides
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile... by
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...Stefan Wolpers
44 views38 slides
Electronic AWB - Electronic Air Waybill by
Electronic AWB - Electronic Air Waybill Electronic AWB - Electronic Air Waybill
Electronic AWB - Electronic Air Waybill Freightoscope
6 views1 slide
Mobile App Development Company by
Mobile App Development CompanyMobile App Development Company
Mobile App Development CompanyRichestsoft
5 views6 slides

Recently uploaded(20)

How to build dyanmic dashboards and ensure they always work by Wiiisdom
How to build dyanmic dashboards and ensure they always workHow to build dyanmic dashboards and ensure they always work
How to build dyanmic dashboards and ensure they always work
Wiiisdom16 views
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile... by Stefan Wolpers
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...
How To Make Your Plans Suck Less — Maarten Dalmijn at the 57th Hands-on Agile...
Stefan Wolpers44 views
Electronic AWB - Electronic Air Waybill by Freightoscope
Electronic AWB - Electronic Air Waybill Electronic AWB - Electronic Air Waybill
Electronic AWB - Electronic Air Waybill
Freightoscope 6 views
Mobile App Development Company by Richestsoft
Mobile App Development CompanyMobile App Development Company
Mobile App Development Company
Richestsoft 5 views
Dapr Unleashed: Accelerating Microservice Development by Miroslav Janeski
Dapr Unleashed: Accelerating Microservice DevelopmentDapr Unleashed: Accelerating Microservice Development
Dapr Unleashed: Accelerating Microservice Development
Miroslav Janeski16 views
FOSSLight Community Day 2023-11-30 by Shane Coughlan
FOSSLight Community Day 2023-11-30FOSSLight Community Day 2023-11-30
FOSSLight Community Day 2023-11-30
Shane Coughlan8 views
Top-5-production-devconMunich-2023.pptx by Tier1 app
Top-5-production-devconMunich-2023.pptxTop-5-production-devconMunich-2023.pptx
Top-5-production-devconMunich-2023.pptx
Tier1 app10 views
aATP - New Correlation Confirmation Feature.pptx by EsatEsenek1
aATP - New Correlation Confirmation Feature.pptxaATP - New Correlation Confirmation Feature.pptx
aATP - New Correlation Confirmation Feature.pptx
EsatEsenek1222 views
Automated Testing of Microsoft Power BI Reports by RTTS
Automated Testing of Microsoft Power BI ReportsAutomated Testing of Microsoft Power BI Reports
Automated Testing of Microsoft Power BI Reports
RTTS11 views
Bootstrapping vs Venture Capital.pptx by Zeljko Svedic
Bootstrapping vs Venture Capital.pptxBootstrapping vs Venture Capital.pptx
Bootstrapping vs Venture Capital.pptx
Zeljko Svedic16 views

Migrating 25K lines of Ant scripting to Gradle

  • 2. Who is this guy?
  • 7. We will consult these 3 experts Linus Torvalds creator of Linux & Git
  • 8. We will consult these 3 experts Linus Torvalds Mark Reinhold creator of Linux & Git Java's chief architect
  • 9. We will consult these 3 experts Linus Torvalds Mark Reinhold Louis van Gaal creator of Linux & Git Java's chief architect manager of Manchester United
  • 10. We will consult these 3 experts Linus Torvalds Mark Reinhold Louis van Gaal creator of Linux & Git Java's chief architect former manager of Manchester United
  • 13. Changes in requirements Present one project, multiple programming languages compiling running automated tests packaging integrating code as early as possible deploying software to TAP
  • 15. XML Let's start by being nice: excels at expressing hierarchical data
  • 16. XML Let's start by being nice: excels at expressing hierarchical data but... build scripting logic doesn't easily fit a hierarchy often it consists of conditional and repeating logic which can be expressed more concisely in a programming language
  • 17. What does Linus think of XML?
  • 18. What does Linus think of XML? ( ) XML is crap. Really. There are no excuses. XML is nasty to parse for humans, and it's a disaster to parse even for computers. There's just no reason for that horrible crap to exist. https://plus.google.com/+LinusTorvalds/posts/X2XVf9Q7MfV
  • 20. Ant vs. Maven according to Mark
  • 21. Ant vs. Maven according to Mark ( ) What's the difference between Ant and Maven? https://www.parleys.com/tutorial/devoxx-fireside-chat
  • 22. Ant vs. Maven according to Mark ( ) What's the difference between Ant and Maven? The creator of Ant has apologized. https://www.parleys.com/tutorial/devoxx-fireside-chat
  • 24. Build tools head-to-head Ant Maven Gradle build script format XML XML Groovy / DSL
  • 25. Build tools head-to-head Ant Maven Gradle build script format XML XML Groovy / DSL dependencies with Ivy built-in built-in
  • 26. Build tools head-to-head Ant Maven Gradle build script format XML XML Groovy / DSL dependencies with Ivy built-in built-in multi-module builds complex simple simple
  • 27. Build tools head-to-head Ant Maven Gradle build script format XML XML Groovy / DSL dependencies with Ivy built-in built-in multi-module builds complex simple simple pre-defined structure absent present present
  • 28. Build tools head-to-head Ant Maven Gradle build script format XML XML Groovy / DSL dependencies with Ivy built-in built-in multi-module builds complex simple simple pre-defined structure absent present present custom structure n/a complex simple
  • 29. Build tools head-to-head Ant Maven Gradle build script format XML XML Groovy / DSL dependencies with Ivy built-in built-in multi-module builds complex simple simple pre-defined structure absent present present custom structure n/a complex simple verbosity high average low
  • 30. Build tools head-to-head Ant Maven Gradle build script format XML XML Groovy / DSL dependencies with Ivy built-in built-in multi-module builds complex simple simple pre-defined structure absent present present custom structure n/a complex simple verbosity high average low learning curve shallow steep average
  • 31. Build tools head-to-head Ant Maven Gradle build script format XML XML Groovy / DSL dependencies with Ivy built-in built-in multi-module builds complex simple simple pre-defined structure absent present present custom structure n/a complex simple verbosity high average low learning curve shallow steep average build order depends-on lifecycles directed acyclic graph
  • 32. Gradle at NS (Dutch Railways)
  • 33. Gradle at NS (Dutch Railways) not at all a 'greenfield project'! 1 million lines of code over 25,000 lines of Ant scripting 30 software developers system behaves like a monolith
  • 35. Migration strategy divide the project into components according to functionality start Gradling at a small, isolated part focus on code that is used regularly (i.e. on a daily basis)
  • 36. Migration strategy divide the project into components according to functionality start Gradling at a small, isolated part focus on code that is used regularly (i.e. on a daily basis) verify after each step that: results are exactly the same as before no problems occur in existing Ant code
  • 37. Migration strategy divide the project into components according to functionality start Gradling at a small, isolated part focus on code that is used regularly (i.e. on a daily basis) verify after each step that: results are exactly the same as before no problems occur in existing Ant code don't fool yourself: not every single line of Ant code should be replaced Ant projects are 'first class citizens'
  • 38. Challenges dependency spaghetti collaboration with existing Ant code continuous integration & delivery
  • 39. Migration result a component's responsibility has become clearer a build will only run if the particular component has changed run unit test in parallel (Gradle decides when) dependencies behave transitively
  • 40. Migration result (lines of code) Language Lines of code (before) Lines of code (after) Ant over 25,000 about 15,000 Gradle 0 1,232
  • 41. What does Louis think of migrating all Ant code?
  • 42. What does Louis think of migrating all Ant code? ( ) In the Netherlands they say: "That is another cook." https://youtu.be/x-QRqOndbzw
  • 45. Wrap-up Ant & Maven: require hard-to-maintain code the purpose of a code fragment is not clearly evident
  • 46. Wrap-up Ant & Maven: require hard-to-maintain code the purpose of a code fragment is not clearly evident often fail to address changing requirements rely heavily on XML
  • 47. Wrap-up Ant & Maven: require hard-to-maintain code the purpose of a code fragment is not clearly evident often fail to address changing requirements rely heavily on XML Gradle is a better alternative
  • 48. Wrap-up (2) Gradle offers structure and flexibility tries to combine the power of Ant and Maven integrates with (almost) anything
  • 49. Wrap-up (3) So no drawbacks whatsoever?
  • 50. Wrap-up (3) So no drawbacks whatsoever? Gradle spends a lot of time on configuration parsing (but this has steadily improved in the past year) developers need to get used to it migrating existing scripting is a lot of work
  • 51. Should my project use Gradle? A brand-new project?
  • 52. Should my project use Gradle? A brand-new project? just do it
  • 53. Should my project use Gradle? A brand-new project? just do it do it RIGHT NOW
  • 54. Should my project use Gradle? An existing project?
  • 55. Should my project use Gradle? An existing project? Will you benefit from Gradles key features? (better performance, maintainability, less verbose, ...)
  • 56. Should my project use Gradle? An existing project? Will you benefit from Gradles key features? (better performance, maintainability, less verbose, ...) Any technical debt to solve?
  • 57. Should my project use Gradle? An existing project? Will you benefit from Gradles key features? (better performance, maintainability, less verbose, ...) Any technical debt to solve? use an artifact repository and remove duplicates divide your project into multiple components define a clear structure in your build logic
  • 59. Further reading "Why Build Your Java Projects with Gradle Rather than Ant or Maven?" by Benjamin Muschko ( ) Gradle User Guide ( ) Gradle Build Language Reference ( ) http://www.drdobbs.com/jvm/why-build-your-java-projects-with-gradle/240168608 http://gradle.org/docs/current/userguide/userguide.html http://gradle.org/docs/current/dsl/index.html
  • 60. Thank you :) You can contact me at: @hannotify hanno.embregts@infosupport.com