SlideShare uma empresa Scribd logo
1 de 18
Baixar para ler offline
Why Gradle?
Gradle makes the impossible possible, the possible
easy and the easy elegant
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
apply plugin: 'java'
group = 'com.mycompany.app'
archivesBaseName = 'my-app'
version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testCompile 'junit:junit:4.11'
}
Maven vs Gradle
Recognition by ThoughtWorks
“Two things have caused fatigue with XML-based build tools like Ant and Maven: too
many angry pointy braces and the coarseness of plug-in architectures. While syntax
issues can be dealt with through generation, plug-in architectures severely limit the
ability for build tools to grow gracefully as projects become more complex. We have
come to feel that plug-ins are the wrong level of abstraction, and prefer language-
based tools like Gradle and Rake instead, because they offer finer-grained abstrac-
tions and more flexibility long term.”
Gradle’s Compelling Feature Set
Convention over Configuration - Build Cycle
Ant was cool but it has maintainability issues, duplicated code.
Maven picks up and idea of convention over configuration. Repeated steps are
standardized. Maven’s core logic can be extended with plugins
Maven has life cyclye; Compile, unit and integration tests, assembling the
artifact, deploying the artifact to local repo, releasing the artifact to remote repo.
Dependency Management over maven central
Shortcomings - Maven “My way or Highway”
● Maven proposes a default structre and lifecycle for a project that often is
too restrictive
● Writing custom extensions for maven is hard. You must learn MOJO
● Plugin versions may be trouble for your environment.
Which one would you prefer?
Flexibility and extensibility but get weak project standardization, tons of
boilerplate code no support for dependency management by picking Ant;
Or You go with maven, which offers a convention over configuration approach
and a seamlessly integrated dependency manager, but an overly restrictive
mindset and cumbersome plugin system.
Or A build tool that offers you both like Gradle!
Here comes Gradle
Groovy instead of XML is
declerative, readable, and
it clearly express the
intention
What is possible with Gradle while it is impossible with others
Directed Acyclic Graph: In maven goals must depend on each other even if they have no dependencies, in gradle must not
Task Exclusion: In gradle you exclude any task from being run and all its dependend tasks
Task Ordering: Gradle supports shouldRunAfter, mustRunAfter operations
Task Dependency Inference: Gradle aware of what it produce. Any task that has java bin directory as input will automatically trigger compileJava.
True Multi Task Execution: You can specify multiple tasks when executing the build and no task in the resulting DAG is executed twice
Dry Run: Show tasks in which order without executing them Ex: gradle -m clean compile
Build automatically when sources change,
Declarative DSL
Integration With Other Build Tools
Gradle builds are 100%compatible with Maven and Ivy Repos. You can retrieve and publish your own artifacts. Also
Gradle provides converter for existing maven builds
Deployment Pipline
● Compile the code
● Runing unit and integration tests
● Performing static code analysis and generating test coverage
● Creating the distribution
● Provisioning the target environment
● Deploying the deliverable
● Performing smoke and automated functional tests
Let’s Get it Started
task helloWorld{
doLast {
println ‘Hello World’
}
}
task helloWorld<<{
println ‘Hello World’
}
task helloWorld{
doFirst{
‘Hello’
}
doLast{
‘World’
}
}
$ gradle -q helloWorld
Hello World!
def chant(){
ant.echo(message: ‘Hell Ant yeah!’)
}
3.times {
task “yayGradle$it” <<{
println ‘Gradle rocks’
}
}
yayGradle0.dependsOn startSession
yayGradle2.dependsOn yayGradle1, yayGradle0
task groupTherapy(dependsOn: yayGradle2)
$ #exclude task
$ gradle groupTherapy -x yayGradle0
$ #show all tasks
$ gradle -q tasks --all
Gradle Daemon
When using gradle day to day basis, you’ll find yourself having to run your build
repetitvely. Each time you initiate a build, the JVM has to be started, Gradle
dependency’s has to be loaded into class loader, and the project model has to be
constructed. This procedure usually takes 2 seconds.
Gradle daemon to the rescue!
$ ~/.gradle/gradle.properties
org.gradle.daemon=true
Let’s do some examples!
Dependency Management
Either one is available throu Gradle, Maven or Ivy Repositories
apply plugin: ‘java’
repositories {
mavenCentral()
mavenLocal()
maven {
url “http://dev.foreks.com/nexus/content/repositories/release
}
ivy {
url “http://repo.foreks.com/ivy/repo”
url “../local-repo”
}
}
dependencies{
compile ‘org.hibernate:hibernate-core:3.6.7.Final’
}
Dependency Configurations
Default configurations are compile, runtime, testCompile, testRuntime
configurations{
perfCompile
}
dependencies{
perfCompile(‘org.openjdk.jmh:jmh-core:1.11.2’,
‘org.openjdk.jmh:jmh-generator-bytecode:1.11.2’,
project)
compile ‘org.codehaus.groovy:groovy-all:2.4.4’
testCompile(‘junit:junit:4.+’, ‘org.spockframework:spock-core:1.0-groovy-2.4’)
testRuntime(‘com.athaydes:spock-reports:1.2.7’)
}
apply plugin: ‘eclipse’
eclipse {
classpath {
plusConfigurations+=[configurations.testCompile, configurations.
perfCompile]
}
}
Publishing artifacts
apply plugin: ‘maven’
uploadArchives{
repositories{
mavenDeployer{
repository(url: ‘ http://dev.foreks.com/nexus/content/repositories/releases ’){
authentication(userName:nexusUsername, passowrd:nexusPassword)
}
snapshotRepository(url: ‘ http://dev.foreks.com/nexus/content/repositories/snapshots ’){
authentication(userName:nexusUsername, password:nexusPassword)
}
}
}
}
Thanks

Mais conteúdo relacionado

Mais procurados

Note - Apache Maven Intro
Note - Apache Maven IntroNote - Apache Maven Intro
Note - Apache Maven Intro
boyw165
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
Vadym Lotar
 

Mais procurados (20)

Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to Maven
 
Maven plugins, properties en profiles: Advanced concepts in Maven
Maven plugins, properties en profiles: Advanced concepts in MavenMaven plugins, properties en profiles: Advanced concepts in Maven
Maven plugins, properties en profiles: Advanced concepts in Maven
 
Maven
MavenMaven
Maven
 
Apache Maven
Apache MavenApache Maven
Apache Maven
 
An Introduction to Maven Part 1
An Introduction to Maven Part 1An Introduction to Maven Part 1
An Introduction to Maven Part 1
 
Maven 2 Introduction
Maven 2 IntroductionMaven 2 Introduction
Maven 2 Introduction
 
Maven
MavenMaven
Maven
 
Maven tutorial
Maven tutorialMaven tutorial
Maven tutorial
 
Maven
MavenMaven
Maven
 
Introduction to Apache Maven
Introduction to Apache MavenIntroduction to Apache Maven
Introduction to Apache Maven
 
Hands on the Gradle
Hands on the GradleHands on the Gradle
Hands on the Gradle
 
Hands On with Maven
Hands On with MavenHands On with Maven
Hands On with Maven
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
 
DevOps叢林裡的小隊游擊戰術 (@ iThome DevOps 2015)
DevOps叢林裡的小隊游擊戰術 (@ iThome DevOps 2015)DevOps叢林裡的小隊游擊戰術 (@ iThome DevOps 2015)
DevOps叢林裡的小隊游擊戰術 (@ iThome DevOps 2015)
 
Introduction to maven
Introduction to mavenIntroduction to maven
Introduction to maven
 
Note - Apache Maven Intro
Note - Apache Maven IntroNote - Apache Maven Intro
Note - Apache Maven Intro
 
Using Maven 2
Using Maven 2Using Maven 2
Using Maven 2
 
maven build certificaton
maven build certificatonmaven build certificaton
maven build certificaton
 
When Web meet Native App
When Web meet Native AppWhen Web meet Native App
When Web meet Native App
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
 

Destaque

Gradle - time for a new build
Gradle - time for a new buildGradle - time for a new build
Gradle - time for a new build
Igor Khotin
 

Destaque (12)

Android Gradle about using flavor
Android Gradle about using flavorAndroid Gradle about using flavor
Android Gradle about using flavor
 
Big Data on the Cloud
Big Data on the CloudBig Data on the Cloud
Big Data on the Cloud
 
Gradle
GradleGradle
Gradle
 
Javaone - Gradle: Harder, Better, Stronger, Faster
Javaone - Gradle: Harder, Better, Stronger, Faster Javaone - Gradle: Harder, Better, Stronger, Faster
Javaone - Gradle: Harder, Better, Stronger, Faster
 
Gradle presentation
Gradle presentationGradle presentation
Gradle presentation
 
Gradle - time for a new build
Gradle - time for a new buildGradle - time for a new build
Gradle - time for a new build
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation Tool
 
Gradle
GradleGradle
Gradle
 
Gradle by Example
Gradle by ExampleGradle by Example
Gradle by Example
 
Gradle
GradleGradle
Gradle
 
An Introduction to Gradle for Java Developers
An Introduction to Gradle for Java DevelopersAn Introduction to Gradle for Java Developers
An Introduction to Gradle for Java Developers
 
Test Driven Design - GDG DevFest Istanbul 2016
Test Driven Design - GDG DevFest Istanbul 2016Test Driven Design - GDG DevFest Istanbul 2016
Test Driven Design - GDG DevFest Istanbul 2016
 

Semelhante a Why gradle

Gradle(the innovation continues)
Gradle(the innovation continues)Gradle(the innovation continues)
Gradle(the innovation continues)
Sejong Park
 

Semelhante a Why gradle (20)

Gradle - Build system evolved
Gradle - Build system evolvedGradle - Build system evolved
Gradle - Build system evolved
 
Eclipse Buildship JUG Hamburg
Eclipse Buildship JUG HamburgEclipse Buildship JUG Hamburg
Eclipse Buildship JUG Hamburg
 
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: 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!
 
Make Your Build Great Again (DroidConSF 2017)
Make Your Build Great Again (DroidConSF 2017)Make Your Build Great Again (DroidConSF 2017)
Make Your Build Great Again (DroidConSF 2017)
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
 
Gradle : An introduction
Gradle : An introduction Gradle : An introduction
Gradle : An introduction
 
What's new in Gradle 4.0
What's new in Gradle 4.0What's new in Gradle 4.0
What's new in Gradle 4.0
 
Neo4j Stored Procedure Training Part 1
Neo4j Stored Procedure Training Part 1Neo4j Stored Procedure Training Part 1
Neo4j Stored Procedure Training Part 1
 
Gradle talk, Javarsovia 2010
Gradle talk, Javarsovia 2010Gradle talk, Javarsovia 2010
Gradle talk, Javarsovia 2010
 
Gradle in 45min
Gradle in 45minGradle in 45min
Gradle in 45min
 
Gradle: The Build system you have been waiting for
Gradle: The Build system you have been waiting forGradle: The Build system you have been waiting for
Gradle: The Build system you have been waiting for
 
Gradle - time for another build
Gradle - time for another buildGradle - time for another build
Gradle - time for another build
 
Enter the gradle
Enter the gradleEnter the gradle
Enter the gradle
 
Gradle notes
Gradle notesGradle notes
Gradle notes
 
Gradle
GradleGradle
Gradle
 
Gradle(the innovation continues)
Gradle(the innovation continues)Gradle(the innovation continues)
Gradle(the innovation continues)
 
Eclipse Buildship DemoCamp Hamburg (June 2015) with additional screenshots
Eclipse Buildship DemoCamp Hamburg (June 2015)  with additional screenshotsEclipse Buildship DemoCamp Hamburg (June 2015)  with additional screenshots
Eclipse Buildship DemoCamp Hamburg (June 2015) with additional screenshots
 
Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]Faster java ee builds with gradle [con4921]
Faster java ee builds with gradle [con4921]
 

Último

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
 

Último (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - 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
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 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
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
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
 
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
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Why gradle

  • 1. Why Gradle? Gradle makes the impossible possible, the possible easy and the easy elegant
  • 3. Recognition by ThoughtWorks “Two things have caused fatigue with XML-based build tools like Ant and Maven: too many angry pointy braces and the coarseness of plug-in architectures. While syntax issues can be dealt with through generation, plug-in architectures severely limit the ability for build tools to grow gracefully as projects become more complex. We have come to feel that plug-ins are the wrong level of abstraction, and prefer language- based tools like Gradle and Rake instead, because they offer finer-grained abstrac- tions and more flexibility long term.”
  • 5. Convention over Configuration - Build Cycle Ant was cool but it has maintainability issues, duplicated code. Maven picks up and idea of convention over configuration. Repeated steps are standardized. Maven’s core logic can be extended with plugins Maven has life cyclye; Compile, unit and integration tests, assembling the artifact, deploying the artifact to local repo, releasing the artifact to remote repo. Dependency Management over maven central
  • 6. Shortcomings - Maven “My way or Highway” ● Maven proposes a default structre and lifecycle for a project that often is too restrictive ● Writing custom extensions for maven is hard. You must learn MOJO ● Plugin versions may be trouble for your environment.
  • 7. Which one would you prefer? Flexibility and extensibility but get weak project standardization, tons of boilerplate code no support for dependency management by picking Ant; Or You go with maven, which offers a convention over configuration approach and a seamlessly integrated dependency manager, but an overly restrictive mindset and cumbersome plugin system. Or A build tool that offers you both like Gradle!
  • 8. Here comes Gradle Groovy instead of XML is declerative, readable, and it clearly express the intention
  • 9. What is possible with Gradle while it is impossible with others Directed Acyclic Graph: In maven goals must depend on each other even if they have no dependencies, in gradle must not Task Exclusion: In gradle you exclude any task from being run and all its dependend tasks Task Ordering: Gradle supports shouldRunAfter, mustRunAfter operations Task Dependency Inference: Gradle aware of what it produce. Any task that has java bin directory as input will automatically trigger compileJava. True Multi Task Execution: You can specify multiple tasks when executing the build and no task in the resulting DAG is executed twice Dry Run: Show tasks in which order without executing them Ex: gradle -m clean compile Build automatically when sources change, Declarative DSL
  • 10. Integration With Other Build Tools Gradle builds are 100%compatible with Maven and Ivy Repos. You can retrieve and publish your own artifacts. Also Gradle provides converter for existing maven builds
  • 11. Deployment Pipline ● Compile the code ● Runing unit and integration tests ● Performing static code analysis and generating test coverage ● Creating the distribution ● Provisioning the target environment ● Deploying the deliverable ● Performing smoke and automated functional tests
  • 12. Let’s Get it Started task helloWorld{ doLast { println ‘Hello World’ } } task helloWorld<<{ println ‘Hello World’ } task helloWorld{ doFirst{ ‘Hello’ } doLast{ ‘World’ } } $ gradle -q helloWorld Hello World! def chant(){ ant.echo(message: ‘Hell Ant yeah!’) } 3.times { task “yayGradle$it” <<{ println ‘Gradle rocks’ } } yayGradle0.dependsOn startSession yayGradle2.dependsOn yayGradle1, yayGradle0 task groupTherapy(dependsOn: yayGradle2) $ #exclude task $ gradle groupTherapy -x yayGradle0 $ #show all tasks $ gradle -q tasks --all
  • 13. Gradle Daemon When using gradle day to day basis, you’ll find yourself having to run your build repetitvely. Each time you initiate a build, the JVM has to be started, Gradle dependency’s has to be loaded into class loader, and the project model has to be constructed. This procedure usually takes 2 seconds. Gradle daemon to the rescue! $ ~/.gradle/gradle.properties org.gradle.daemon=true
  • 14. Let’s do some examples!
  • 15. Dependency Management Either one is available throu Gradle, Maven or Ivy Repositories apply plugin: ‘java’ repositories { mavenCentral() mavenLocal() maven { url “http://dev.foreks.com/nexus/content/repositories/release } ivy { url “http://repo.foreks.com/ivy/repo” url “../local-repo” } } dependencies{ compile ‘org.hibernate:hibernate-core:3.6.7.Final’ }
  • 16. Dependency Configurations Default configurations are compile, runtime, testCompile, testRuntime configurations{ perfCompile } dependencies{ perfCompile(‘org.openjdk.jmh:jmh-core:1.11.2’, ‘org.openjdk.jmh:jmh-generator-bytecode:1.11.2’, project) compile ‘org.codehaus.groovy:groovy-all:2.4.4’ testCompile(‘junit:junit:4.+’, ‘org.spockframework:spock-core:1.0-groovy-2.4’) testRuntime(‘com.athaydes:spock-reports:1.2.7’) } apply plugin: ‘eclipse’ eclipse { classpath { plusConfigurations+=[configurations.testCompile, configurations. perfCompile] } }
  • 17. Publishing artifacts apply plugin: ‘maven’ uploadArchives{ repositories{ mavenDeployer{ repository(url: ‘ http://dev.foreks.com/nexus/content/repositories/releases ’){ authentication(userName:nexusUsername, passowrd:nexusPassword) } snapshotRepository(url: ‘ http://dev.foreks.com/nexus/content/repositories/snapshots ’){ authentication(userName:nexusUsername, password:nexusPassword) } } } }