SlideShare uma empresa Scribd logo
1 de 39
Gradle
Evgeny Borisov
Good to be programmer…
You start crooked, everything is crooked
What are the tasks of build today?
• VCS
• CI scripts & different xml configurations
• Dependency management
• Deployment (clustering)
• Unit and sanity Tests
• Documentation
• …
Grandson will not come
today, he sent mail that
the build failed.
Which build tools do you know?
I use…
1. Gradle
2. Maven
3. Ant
4. Ivy
5. I build with my hands…
Declarative & Imperative
Declarative & Imperative
• ANT – Imperative
• Maven - Declarative Not really
Maven
<build>
</build>
We Love you, XML
<build>
</build>
We also have two problems…
• XML - yes, DSL- no
Who will be today’s Chuck Norris?
Why Gradle?
• Not adopted to specific type project
• Powerful DSL, which can be extended easily
• Groovy
• Effective build
– Tasks can run in parallel
– Incremental build
One doesn’t simply talk.
Lets build some project.
Where is my
print???
test {
testLogging.showStandardStreams = true
}
Build task dependency graph
It’s exactly like in maven
Not like maven at all
• You can add
dependency to existing
task
• You can change task
behavior via it’s
properties
• You can extend tasks
Build task dependency graph
I need a war!
Lets write a Task
1. Class MyTask extends DefaultTask
2. Write a method @TaskAction
3. Add it to DSL
4. That is all!
Additional plugins
• Groovy Plugin
• The Scala Plugin
• The War Plugin
• The Ear Plugin
• The Jetty Plugin
• The Eclipse Plugin
• The IDEA Plugin
• AspectJ plugin
• ClassLoader plugin
• Exec plugin
• JavaFx Plugin
• Tomcat Plugin
• Android Plugin
• The FindBugs Plugin
Your own Plugin
• Why should I write my own plugin?
It’s not enough to write my own tasks?
• Extend DSL.
– We want declarative build!
Do you want plugin???
• How to write plugin:
https://bitbucket.org/davidmc24/gradle-
bintray-
plugin/src/6adc1aca5ed712b8802fe6b3830b2d
860d9fda88/Bintray.gradle?at=default
• Adding plugin:
buildscript: apply from: 'gradle/Bintray.gradle'
• Usage:
repositories { bintray.jcenter() }
I can’t get out of here
I deep in this
ant shit
You love ant?
Migrating from ant to gradle
Migrating from ant
I can’t migrate from maven
Yes you can!
maven2gradle plugin
1. Type this in your build.gradle :
apply plugin:’maven2Gradle’
2. Put this script near you pom
3. Run: gradle build
What to read?
• http://www.gradle.org/docs/current/userguid
e/userguide.html
• http://www.gradle.org/docs/current/dsl/
• http://www.gradle.org/docs/current/javadoc/
Q&A
• bsevgeny@gmail.com

Mais conteúdo relacionado

Mais procurados

There is something about JavaScript - Choose Forum 2014
There is something about JavaScript - Choose Forum 2014There is something about JavaScript - Choose Forum 2014
There is something about JavaScript - Choose Forum 2014
jbandi
 

Mais procurados (20)

Continuous Integration with Maven for Android apps
Continuous Integration with Maven for Android appsContinuous Integration with Maven for Android apps
Continuous Integration with Maven for Android apps
 
Groovy and noteworthy
Groovy and noteworthyGroovy and noteworthy
Groovy and noteworthy
 
Typescript kata The TDD style 2 edition
Typescript kata The TDD style 2 editionTypescript kata The TDD style 2 edition
Typescript kata The TDD style 2 edition
 
Gradle enabled android project
Gradle enabled android projectGradle enabled android project
Gradle enabled android project
 
Agile .NET Development with BDD and Continuous Integration
Agile .NET Development with BDD and Continuous IntegrationAgile .NET Development with BDD and Continuous Integration
Agile .NET Development with BDD and Continuous Integration
 
A walkthrough of JavaScript ES6 features
A walkthrough of JavaScript ES6 featuresA walkthrough of JavaScript ES6 features
A walkthrough of JavaScript ES6 features
 
Introduction to Spock: A Unit Testing Framework
Introduction to Spock: A Unit Testing FrameworkIntroduction to Spock: A Unit Testing Framework
Introduction to Spock: A Unit Testing Framework
 
Polyglot Gradle with Node.js and Play
Polyglot Gradle with Node.js and PlayPolyglot Gradle with Node.js and Play
Polyglot Gradle with Node.js and Play
 
Python id meetup, Maintaining a Dirty Code Django Project
Python id meetup, Maintaining a Dirty Code Django ProjectPython id meetup, Maintaining a Dirty Code Django Project
Python id meetup, Maintaining a Dirty Code Django Project
 
Prg 421 guide focus dreams prg421guide.com
Prg 421 guide focus dreams   prg421guide.comPrg 421 guide focus dreams   prg421guide.com
Prg 421 guide focus dreams prg421guide.com
 
Use groovy & grails in your spring boot projects
Use groovy & grails in your spring boot projectsUse groovy & grails in your spring boot projects
Use groovy & grails in your spring boot projects
 
WordPress automation and CI
WordPress automation and CIWordPress automation and CI
WordPress automation and CI
 
Presentasi jlp
Presentasi jlpPresentasi jlp
Presentasi jlp
 
There is something about JavaScript - Choose Forum 2014
There is something about JavaScript - Choose Forum 2014There is something about JavaScript - Choose Forum 2014
There is something about JavaScript - Choose Forum 2014
 
Java & JavaScript: Best Friends?
Java & JavaScript: Best Friends?Java & JavaScript: Best Friends?
Java & JavaScript: Best Friends?
 
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
Modules in Java? Finally! (OpenJDK 9 Jigsaw, JSR376)
 
TypeScript
TypeScriptTypeScript
TypeScript
 
React Native: How It Works
React Native: How It WorksReact Native: How It Works
React Native: How It Works
 
Building at a glance
Building at a glanceBuilding at a glance
Building at a glance
 
Professional JavaScript Development (An Introduction for Java Developers)
Professional JavaScript Development (An Introduction for Java Developers)Professional JavaScript Development (An Introduction for Java Developers)
Professional JavaScript Development (An Introduction for Java Developers)
 

Semelhante a Javaone 2013 moscow gradle english

Semelhante a Javaone 2013 moscow gradle english (20)

Exploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & BeyondExploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & Beyond
 
Gradle: One technology to build them all
Gradle: One technology to build them allGradle: One technology to build them all
Gradle: One technology to build them all
 
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
 
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
 
A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5
 
Gradle explained
Gradle explainedGradle explained
Gradle explained
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overview
 
Getting started with Vue.js - CodeMash 2020
Getting started with Vue.js - CodeMash 2020Getting started with Vue.js - CodeMash 2020
Getting started with Vue.js - CodeMash 2020
 
Javascript Apps at Build Artifacts
Javascript Apps at Build ArtifactsJavascript Apps at Build Artifacts
Javascript Apps at Build Artifacts
 
Enterprise build tool gradle
Enterprise build tool gradleEnterprise build tool gradle
Enterprise build tool gradle
 
What Visual Studio Code can do for Java Development
What Visual Studio Code can do for Java DevelopmentWhat Visual Studio Code can do for Java Development
What Visual Studio Code can do for Java Development
 
The Architect Way
The Architect WayThe Architect Way
The Architect Way
 
Azure Integration DTAP Series, How to go from Development to Production – Par...
Azure Integration DTAP Series, How to go from Development to Production – Par...Azure Integration DTAP Series, How to go from Development to Production – Par...
Azure Integration DTAP Series, How to go from Development to Production – Par...
 
Using Multi-stage Docker, Go, Java,& Bazel to DESTROY Long Build Times
Using Multi-stage Docker, Go, Java,& Bazel to DESTROY Long Build TimesUsing Multi-stage Docker, Go, Java,& Bazel to DESTROY Long Build Times
Using Multi-stage Docker, Go, Java,& Bazel to DESTROY Long Build Times
 
Android gradle-build-system-overview
Android gradle-build-system-overviewAndroid gradle-build-system-overview
Android gradle-build-system-overview
 
Short Introduction of software engineering for bioinformatics
Short Introduction of software engineering for bioinformatics Short Introduction of software engineering for bioinformatics
Short Introduction of software engineering for bioinformatics
 
Gradle 2.breaking stereotypes.
Gradle 2.breaking stereotypes.Gradle 2.breaking stereotypes.
Gradle 2.breaking stereotypes.
 
Why Gradle?
Why Gradle?Why Gradle?
Why Gradle?
 
How I learned to stop worrying and love embedding JavaScript
How I learned to stop worrying and love embedding JavaScriptHow I learned to stop worrying and love embedding JavaScript
How I learned to stop worrying and love embedding JavaScript
 
Embedding V8 in Android apps with Ejecta-V8
Embedding V8 in Android apps with Ejecta-V8Embedding V8 in Android apps with Ejecta-V8
Embedding V8 in Android apps with Ejecta-V8
 

Mais de Evgeny Borisov (10)

Java 8 puzzlers
Java 8 puzzlersJava 8 puzzlers
Java 8 puzzlers
 
Spring puzzlers 2
Spring puzzlers 2Spring puzzlers 2
Spring puzzlers 2
 
мифы о спарке
мифы о спарке мифы о спарке
мифы о спарке
 
Spring puzzlers
Spring puzzlersSpring puzzlers
Spring puzzlers
 
Spring data jee conf
Spring data jee confSpring data jee conf
Spring data jee conf
 
Groovy puzzlers jug-moscow-part 2
Groovy puzzlers jug-moscow-part 2Groovy puzzlers jug-moscow-part 2
Groovy puzzlers jug-moscow-part 2
 
Groovy jug-moscow-part 1
Groovy jug-moscow-part 1Groovy jug-moscow-part 1
Groovy jug-moscow-part 1
 
Spock
SpockSpock
Spock
 
Spring the ripper
Spring the ripperSpring the ripper
Spring the ripper
 
Javaone 2013 moscow gradle
Javaone 2013 moscow gradleJavaone 2013 moscow gradle
Javaone 2013 moscow gradle
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Javaone 2013 moscow gradle english