SlideShare ist ein Scribd-Unternehmen logo
1 von 27
The world of Gradle
Tricode Slide Share
Februari 2014

Tricode BV
De Schutterij 12 -18
3905 PL Veenendaal
The Netherlands
tel: 0318 - 559210
fax: 0318 - 650909
www.tricode.nl
info@tricode.nl
What is Gradle?

“Gradle is build automation evolved”
Why create Gradle?
What happened since Ant (2000) and Maven (2003):
● Agile Manifesto
● Continues Development
● Continues Integration
● Continues Deployment
Gradle adapts these innovation in its building tool
Why use Gradle? (2)

“Gradle combines the power and flexibility of Ant
with the dependency management and conventions
of Maven into a more effective way to build.”
Why use Gradle?

Declarative

Imperative
Ant

Gradle

Maven
Gradle vs. Maven
Maven
<!-- The smallest possible Maven POM.xml -->
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.tricode.academy.samples</groupId>
<artifactId>sample</artifactId>
<version>0.0.1-SNAPSHOT</version>
</project>

Gradle
apply plugin: 'java'
Maven vs. Gradle
build
|── classes
|
└── main
|
└── Main.class
|── dependency-cache
|── libs
|
└── maven-gradle-comparison-simple.jar
|── reports
|
└── tests
|
├── css3-pie-1.0beta3.htc
|
├── index.html
|
├── report.js
|
└── style.css
|── test-results
|── tmp
└── jar
└── MANIFEST.MF
Gradle Tasks
build.gradle
task helloWorld << {
println 'hello, world'
}
run
gradle -q helloWorld

output
hello, world
Available Gradle plugins
Language plugins:
Java
● Groovy
● Scala
● Antlr
●

Integration plugins:

EAR
● Maven
● OSGI
● War
●
Gradle Plugin: Java
apply plugin: 'java'
Tasks:
●assemble
●build
●buildDependencies
●buildNeeded
●check
●classes
●clean
●compileJava

compileTestJava
●jar
●javadoc
●processResources
●processTestResources
●test
●testClasses
●
Dependency Management
repositories {
mavenCentral()
mavenRepo(urls: 'http://repo.gradle.org/gradle/libs-releases-local')
}
Dependencies {
compile 'com.google.guava:guava:15.0'
testCompile group: 'junit', name: 'junit', version:'4.11+'
}
Start testing with jUnit
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
testCompile 'junit:junit:4.8.2'
}
test {
maxParallelForks = 5
forkEvery = 50
}
Start testing with TestNG
apply plugin: 'java'
repositories {
mavenCentral()
}
test {
useTestNG()
}

dependencies {
testCompile 'org.testng:testng:6.0.1'
}
Testing
test {
include '**/Test*.*'
}
task integrationTest(type: Test, dependsOn: "test") << {
include '**/IntegrationTest*.*'
}
Gradle Tasks
task hello << {
print 'hello, '
}
hello << {
println 'world'
}

$ gradle -q hello
hello, world
$
dependsOn (Task)
task hello {
print 'hello, '
}
task world << {
dependsOn hello
}
world << {
println 'world'
}
dependsOn (Task)
task world(dependsOn: hello) {
println 'world'
}

task world {
println 'world'
}

world.dependsOn hello
doFirst & doLast (closure)
task hello << {
println 'world'
}
hello.doFirst {
print 'hello, '
}
doFirst & doLast (closure) (2)
task hello << {
println 'world'
}
hello.doFirst {
print 'hello, '
}

hello.doFirst {
print 'hi, '
}
onlyIf (closure)
task createSchema << {
println 'create database schema'
}
task loadTestData(dependsOn: createSchema) << {
println 'load test data'
}
loadTestData.onlyIf {
System.properties['load.data'] == 'true'
}
$ build loadTestData
:createSchema
create database schema
:loadTestData SKIPPED
$ gradle -Dload.data=true loadTestData
DefaultTask properties
task emailMe(dependsOn: compileJava) << {
if(tasks.compileJava.didWork) {
println 'SEND EMAIL ANNOUNCING SUCCESS'
}
}

task sendEmails(dependsOn: compileJava) << {
println 'send emails'
}
sendEmails.enabled = false
How to build Multi Projects
project
build.gradle
apply plugin: 'java'
settings.gradle
include 'api', 'service'
Dependency Management
dependencies {
compile project(':api')
}
How to build Multi Projects
One build file
allprojects {
apply plugin: 'java'
repositories {
mavenCentral()
}

dependencies {
testCompile: 'junit:junit:4.11'
}
}
project(':service'') {
dependencies {
compile project(':api')
}
}
How to build Multi Projects
Hybrid
allprojects {
apply plugin: 'java'

repositories {
mavenCentral()
}
dependencies {
testCompile: 'junit:junit:4.11'
}
}
Upload artifacts
apply plugin: 'java'
apply plugin: 'maven'

group = 'com.gradleware.samples'
uploadArchives {
repositories.mavenDeployer {
repository(url: "file:///mytemprepo/")
}
}
Want to know more?
We suggest to read:
Building and Testing with Gradle
Tim Bergland
ISBN-10: 144930463X
ISBN-13: 978-1449304638
Thank you for watching this slide share

Follow us on:
tricode.nl
facebook.com/tricode
linkedin.com/company/tricode
slideshare.net/tricode
twitter.com/tricode

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Gradle: The Build System you have been waiting for!
Gradle: The Build System you have been waiting for!Gradle: The Build System you have been waiting for!
Gradle: The Build System you have been waiting for!
 
Android presentation - Gradle ++
Android presentation - Gradle ++Android presentation - Gradle ++
Android presentation - Gradle ++
 
Gradle 3.0: Unleash the Daemon!
Gradle 3.0: Unleash the Daemon!Gradle 3.0: Unleash the Daemon!
Gradle 3.0: Unleash the Daemon!
 
Building with Gradle
Building with GradleBuilding with Gradle
Building with Gradle
 
Gradle presentation
Gradle presentationGradle presentation
Gradle presentation
 
Gradle in 45min
Gradle in 45minGradle in 45min
Gradle in 45min
 
Introduction to gradle
Introduction to gradleIntroduction to gradle
Introduction to gradle
 
Gradle
GradleGradle
Gradle
 
Hands on the Gradle
Hands on the GradleHands on the Gradle
Hands on the Gradle
 
Managing dependencies with gradle
Managing dependencies with gradleManaging dependencies with gradle
Managing dependencies with gradle
 
An introduction to maven gradle and sbt
An introduction to maven gradle and sbtAn introduction to maven gradle and sbt
An introduction to maven gradle and sbt
 
Gradle For Beginners (Serbian Developer Conference 2013 english)
Gradle For Beginners (Serbian Developer Conference 2013 english)Gradle For Beginners (Serbian Developer Conference 2013 english)
Gradle For Beginners (Serbian Developer Conference 2013 english)
 
うさぎ組 in G* WorkShop -うさみみの日常-
うさぎ組 in G* WorkShop -うさみみの日常-うさぎ組 in G* WorkShop -うさみみの日常-
うさぎ組 in G* WorkShop -うさみみの日常-
 
In the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: GradleIn the Brain of Hans Dockter: Gradle
In the Brain of Hans Dockter: Gradle
 
Gradle by Example
Gradle by ExampleGradle by Example
Gradle by Example
 
Gradle - Build system evolved
Gradle - Build system evolvedGradle - Build system evolved
Gradle - Build system evolved
 
Gradle plugins, take it to the next level
Gradle plugins, take it to the next levelGradle plugins, take it to the next level
Gradle plugins, take it to the next level
 
NetBeans Support for EcmaScript 6
NetBeans Support for EcmaScript 6NetBeans Support for EcmaScript 6
NetBeans Support for EcmaScript 6
 
Scala and Play with Gradle
Scala and Play with GradleScala and Play with Gradle
Scala and Play with Gradle
 
GradleFX
GradleFXGradleFX
GradleFX
 

Ähnlich wie The world of gradle - an introduction for developers

Rapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 PlatformRapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 Platform
WSO2
 

Ähnlich wie The world of gradle - an introduction for developers (20)

Why gradle
Why gradle Why gradle
Why gradle
 
Going web native
Going web nativeGoing web native
Going web native
 
[AngularJS] From Angular to Mobile in 30 minutes
[AngularJS] From Angular to Mobile in 30 minutes[AngularJS] From Angular to Mobile in 30 minutes
[AngularJS] From Angular to Mobile in 30 minutes
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyHTML5 for the Silverlight Guy
HTML5 for the Silverlight Guy
 
Google app engine by example
Google app engine by exampleGoogle app engine by example
Google app engine by example
 
Frontin like-a-backer
Frontin like-a-backerFrontin like-a-backer
Frontin like-a-backer
 
Svelte JS introduction
Svelte JS introductionSvelte JS introduction
Svelte JS introduction
 
Reactive Type-safe WebComponents
Reactive Type-safe WebComponentsReactive Type-safe WebComponents
Reactive Type-safe WebComponents
 
Reactive Type safe Webcomponents with skateJS
Reactive Type safe Webcomponents with skateJSReactive Type safe Webcomponents with skateJS
Reactive Type safe Webcomponents with skateJS
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Rapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 PlatformRapid Application Development with WSO2 Platform
Rapid Application Development with WSO2 Platform
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJS
 
A brief guide to android gradle
A brief guide to android gradleA brief guide to android gradle
A brief guide to android gradle
 
Backbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCBackbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVC
 
Refactoring Wunderlist. UA Mobile 2016.
Refactoring Wunderlist. UA Mobile 2016.Refactoring Wunderlist. UA Mobile 2016.
Refactoring Wunderlist. UA Mobile 2016.
 
code-camp-meteor
code-camp-meteorcode-camp-meteor
code-camp-meteor
 
Plugin for Plugin, или расширяем Android New Build System. Антон Руткевич
 Plugin for Plugin, или расширяем Android New Build System. Антон Руткевич Plugin for Plugin, или расширяем Android New Build System. Антон Руткевич
Plugin for Plugin, или расширяем Android New Build System. Антон Руткевич
 
20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-final20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-final
 
dbadapters
dbadaptersdbadapters
dbadapters
 
Dropwizard and Friends
Dropwizard and FriendsDropwizard and Friends
Dropwizard and Friends
 

Mehr von Tricode (part of Dept)

Mehr von Tricode (part of Dept) (20)

The Top Benefits of Magnolia CMS’s Inspirational Open Suite Ideology
The Top Benefits of Magnolia CMS’s Inspirational Open Suite IdeologyThe Top Benefits of Magnolia CMS’s Inspirational Open Suite Ideology
The Top Benefits of Magnolia CMS’s Inspirational Open Suite Ideology
 
Agile QA 2017: A New Hope
Agile QA 2017: A New HopeAgile QA 2017: A New Hope
Agile QA 2017: A New Hope
 
Mobile Sensor Networks based on Smartphone devices and Web Services
Mobile Sensor Networks based on Smartphone devices and Web ServicesMobile Sensor Networks based on Smartphone devices and Web Services
Mobile Sensor Networks based on Smartphone devices and Web Services
 
Keeping Your Clients Happy and Your Management Even Happier
Keeping Your Clients Happy and Your Management Even Happier Keeping Your Clients Happy and Your Management Even Happier
Keeping Your Clients Happy and Your Management Even Happier
 
Intro to JHipster
Intro to JHipster Intro to JHipster
Intro to JHipster
 
Porn, the leading influencer of Technology
Porn, the leading influencer of Technology Porn, the leading influencer of Technology
Porn, the leading influencer of Technology
 
De 4 belangrijkste risicofactoren van het nearshoring proces
De 4 belangrijkste risicofactoren van het nearshoring procesDe 4 belangrijkste risicofactoren van het nearshoring proces
De 4 belangrijkste risicofactoren van het nearshoring proces
 
Internet Addiction (Social Media Edition)
Internet Addiction (Social Media Edition)Internet Addiction (Social Media Edition)
Internet Addiction (Social Media Edition)
 
Kids Can Code - an interactive IT workshop
Kids Can Code - an interactive IT workshopKids Can Code - an interactive IT workshop
Kids Can Code - an interactive IT workshop
 
RESTful API - Best Practices
RESTful API - Best PracticesRESTful API - Best Practices
RESTful API - Best Practices
 
Deep Learning - STM 6
Deep Learning - STM 6Deep Learning - STM 6
Deep Learning - STM 6
 
How Technology is Affecting Society - STM 6
How Technology is Affecting Society - STM 6How Technology is Affecting Society - STM 6
How Technology is Affecting Society - STM 6
 
Monolithic to Microservices Architecture - STM 6
Monolithic to Microservices Architecture - STM 6Monolithic to Microservices Architecture - STM 6
Monolithic to Microservices Architecture - STM 6
 
Customers speak on Magnolia CMS
Customers speak on Magnolia CMSCustomers speak on Magnolia CMS
Customers speak on Magnolia CMS
 
Quality Nearshoring met Tricode
Quality Nearshoring met TricodeQuality Nearshoring met Tricode
Quality Nearshoring met Tricode
 
AEM Digital Assets Management - What's new in 6.2?
AEM Digital Assets Management - What's new in 6.2?AEM Digital Assets Management - What's new in 6.2?
AEM Digital Assets Management - What's new in 6.2?
 
10 nearshoring it trends om in 2016 te volgen
10 nearshoring it trends om in 2016 te volgen 10 nearshoring it trends om in 2016 te volgen
10 nearshoring it trends om in 2016 te volgen
 
Tricode & Magnolia
Tricode & MagnoliaTricode & Magnolia
Tricode & Magnolia
 
Why you should use Adobe Experience Manager Mobile
Why you should use Adobe Experience Manager Mobile Why you should use Adobe Experience Manager Mobile
Why you should use Adobe Experience Manager Mobile
 
Introducing: Tricode's Software Factory
Introducing: Tricode's Software FactoryIntroducing: Tricode's Software Factory
Introducing: Tricode's Software Factory
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 

The world of gradle - an introduction for developers

  • 1. The world of Gradle Tricode Slide Share Februari 2014 Tricode BV De Schutterij 12 -18 3905 PL Veenendaal The Netherlands tel: 0318 - 559210 fax: 0318 - 650909 www.tricode.nl info@tricode.nl
  • 2. What is Gradle? “Gradle is build automation evolved”
  • 3. Why create Gradle? What happened since Ant (2000) and Maven (2003): ● Agile Manifesto ● Continues Development ● Continues Integration ● Continues Deployment Gradle adapts these innovation in its building tool
  • 4. Why use Gradle? (2) “Gradle combines the power and flexibility of Ant with the dependency management and conventions of Maven into a more effective way to build.”
  • 6. Gradle vs. Maven Maven <!-- The smallest possible Maven POM.xml --> <project> <modelVersion>4.0.0</modelVersion> <groupId>com.tricode.academy.samples</groupId> <artifactId>sample</artifactId> <version>0.0.1-SNAPSHOT</version> </project> Gradle apply plugin: 'java'
  • 7. Maven vs. Gradle build |── classes | └── main | └── Main.class |── dependency-cache |── libs | └── maven-gradle-comparison-simple.jar |── reports | └── tests | ├── css3-pie-1.0beta3.htc | ├── index.html | ├── report.js | └── style.css |── test-results |── tmp └── jar └── MANIFEST.MF
  • 8. Gradle Tasks build.gradle task helloWorld << { println 'hello, world' } run gradle -q helloWorld output hello, world
  • 9. Available Gradle plugins Language plugins: Java ● Groovy ● Scala ● Antlr ● Integration plugins: EAR ● Maven ● OSGI ● War ●
  • 10. Gradle Plugin: Java apply plugin: 'java' Tasks: ●assemble ●build ●buildDependencies ●buildNeeded ●check ●classes ●clean ●compileJava compileTestJava ●jar ●javadoc ●processResources ●processTestResources ●test ●testClasses ●
  • 11. Dependency Management repositories { mavenCentral() mavenRepo(urls: 'http://repo.gradle.org/gradle/libs-releases-local') } Dependencies { compile 'com.google.guava:guava:15.0' testCompile group: 'junit', name: 'junit', version:'4.11+' }
  • 12. Start testing with jUnit apply plugin: 'java' repositories { mavenCentral() } dependencies { testCompile 'junit:junit:4.8.2' } test { maxParallelForks = 5 forkEvery = 50 }
  • 13. Start testing with TestNG apply plugin: 'java' repositories { mavenCentral() } test { useTestNG() } dependencies { testCompile 'org.testng:testng:6.0.1' }
  • 14. Testing test { include '**/Test*.*' } task integrationTest(type: Test, dependsOn: "test") << { include '**/IntegrationTest*.*' }
  • 15. Gradle Tasks task hello << { print 'hello, ' } hello << { println 'world' } $ gradle -q hello hello, world $
  • 16. dependsOn (Task) task hello { print 'hello, ' } task world << { dependsOn hello } world << { println 'world' }
  • 17. dependsOn (Task) task world(dependsOn: hello) { println 'world' } task world { println 'world' } world.dependsOn hello
  • 18. doFirst & doLast (closure) task hello << { println 'world' } hello.doFirst { print 'hello, ' }
  • 19. doFirst & doLast (closure) (2) task hello << { println 'world' } hello.doFirst { print 'hello, ' } hello.doFirst { print 'hi, ' }
  • 20. onlyIf (closure) task createSchema << { println 'create database schema' } task loadTestData(dependsOn: createSchema) << { println 'load test data' } loadTestData.onlyIf { System.properties['load.data'] == 'true' } $ build loadTestData :createSchema create database schema :loadTestData SKIPPED $ gradle -Dload.data=true loadTestData
  • 21. DefaultTask properties task emailMe(dependsOn: compileJava) << { if(tasks.compileJava.didWork) { println 'SEND EMAIL ANNOUNCING SUCCESS' } } task sendEmails(dependsOn: compileJava) << { println 'send emails' } sendEmails.enabled = false
  • 22. How to build Multi Projects project build.gradle apply plugin: 'java' settings.gradle include 'api', 'service' Dependency Management dependencies { compile project(':api') }
  • 23. How to build Multi Projects One build file allprojects { apply plugin: 'java' repositories { mavenCentral() } dependencies { testCompile: 'junit:junit:4.11' } } project(':service'') { dependencies { compile project(':api') } }
  • 24. How to build Multi Projects Hybrid allprojects { apply plugin: 'java' repositories { mavenCentral() } dependencies { testCompile: 'junit:junit:4.11' } }
  • 25. Upload artifacts apply plugin: 'java' apply plugin: 'maven' group = 'com.gradleware.samples' uploadArchives { repositories.mavenDeployer { repository(url: "file:///mytemprepo/") } }
  • 26. Want to know more? We suggest to read: Building and Testing with Gradle Tim Bergland ISBN-10: 144930463X ISBN-13: 978-1449304638
  • 27. Thank you for watching this slide share Follow us on: tricode.nl facebook.com/tricode linkedin.com/company/tricode slideshare.net/tricode twitter.com/tricode