SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
An Introduction to Gradle for Java
Developers
Kostas Saidis
www.niovity.com
Java Hellenic User Group Meetup
April 2, 2016
About Me
Kostas Saidis
saiko@niovity.com
Software & Data
Architect
Twitter:
@saikos
Linkedin:
http://gr.linkedin.com/in/saiko
Academia
BSc @ cs.unipi.gr (2001)
MSc @ di.uoa.gr (2004)
PhD @ di.uoa.gr (2011)
Industry
Freelance consultant, developer &
instructor since 1999
Enterpreneur since 2011 (niovity)
Java
Early Java enthusiast (1997)
Groovyist since 2011
Using Gradle
Building software with Gradle
Since version 0.9
Fifteen real-life projects with team sizes ranging from 2 to 10
members
Custom plugin authoring
Target audience
Java developers
with little or no experience
in Gradle or another build tool.
Build tools
www.ayorkshirehome.com
Software build tools
Tools for managing and automating
the software build process.
Software what?
Building
software
sucks!
(big time)
Software build process
Develop
Test
Assemble
Deploy
Integrate
Repeat
Again and again and again
What is Gradle?
Gradle is one of the finest software
build tools out there
Makes the software build process easier to setup, extend and maintain
In this presentation
We focus on understanding Gradle
Gradle is a superb piece of software
What makes it so great?
No flame wars
No feature comparison with other tools
At a glance
Gradle
Open source: Apache License v2
First release 2009, latest release March 2016 (2.12)
Backed by Gradleware... ooops, I mean Gradle Inc
Used by: Android, Spring IO, Linkedin, Netflix, Twitter and more...
At a glance
Gradle
Combines the best of Ant, Ivy and Maven
Cross-platform file management
Dependency management
Conventions
In a smart and extensible way
Deep API
Groovy DSL
Easy-to-write plugins
Ultimately offering
Clean and elegant builds
Plenty of new features
Better build management
Features
Non exhaustive list
Full-fledged programmability
Both declarative and imperative
Convention over configuration
Transitive dependency management
Multi-project builds
Polyglot (not only Java)
Numerous plugins and integrations
Incremental and parallel execution
Reporting and analytics
Embeddable
Great documentation
The most distinct features
IMHO
1. Its superb design and technical sophistication.
2. The exposure and manipulation of its “internal” Java APIs
through Groovy (aka the Groovy DSL).
A simple example
A simple Java project
1 apply plugin: ”java”
2 group = ”org.foo.something”
3 version = ”1.0−SNAPSHOT”
4 repositories {
5 mavenCentral()
6 }
7 dependencies {
8 compile ”commons−io:commons−io:2.4”
9 testCompile ”junit:junit:4.11”
10 runtime files(”lib/foo.jar”, ”lib/bar.jar”)
11 }
The contents of build.gradle (aka the build script), placed in the root folder of the
project.
Core Concepts
Build script: a build configuration script supporting one or more
projects.
Project: a component that needs to be built. It is made up of
one or more tasks.
Task: a distinct step required to perform the build. Each
task/step is atomic (either succeeds or fails).
Publication: the artifact produced by the build process.
Dependency Resolution
Dependencies: tasks and projects depending on each other (internal)
or on third-party artifacts (external).
Transitive dependencies: the dependencies of a project may
themselves have dependencies.
Repositories: the “places” that hold external dependencies
(Maven/Ivy repos, local folders).
DAG: the directed acyclic graph of dependencies (what
depends on what).
Dependency configurations : named sets (groups) of dependencies
(e.g. per task).
Plugins
A plugin applies a set of extensions to the build process.
Add taks to a project.
Pre-configure these tasks with reasonable defaults.
Add dependency configurations.
Add new properties and methods to existing objects.
Plugins implement the “build-by-convention” principle in a flexible
way.
The Build Lifecycle
1. Initialization: initialization of the project.
2. Configuration: configuration of the project (computes the DAG).
3. Execution: executes the sequence of build tasks.
The simple example
1 apply plugin: ”java”
2 //Introduces a set of Maven−style conventions
3 //(tasks, source locations, dependency configurations, etc)
4 group = ”org.foo.something”
5 version = ”1.0−SNAPSHOT”
6 repositories {
7 //resolve all external dependencies via Maven central
8 mavenCentral()
9 }
10 dependencies {
11 //each name (compile, testCompile, etc) refers to
12 //a configuration introduced by the java plugin
13 compile ”commons−io:commons−io:2.4”
14 testCompile ”junit:junit:4.11”
15 runtime files(”lib/foo.jar”, ”lib/bar.jar”)
16 }
Invoking gradle
Run a build task
> gradle test
Compiles the sources and runs the tests
> gradle tasks
clean, assemble, build, classes, testClasses, test, jar, etc
Never invoke gradle directly but always use the gradle wrapper: a
mechanism to execute gradle without manually installing it
beforehand (not covered here).
A more complex example
Ant integration, custom tasks
1 apply plugin:’java’
2 task generateFiles(type: JavaExec) {
3 main = ’some.class.name’
4 classpath = sourceSets.main.runtimeClasspath
5 args = [ projectDir, ’path/to/gen/files’ ]
6 }
7 test {
8 dependsOn generateFiles
9 doLast {
10 ant.copy(toDir:’build/test−classes’){
11 fileset dir:’path/to/gen/files’
12 }
13 }
14 }
15 import org.apache.commons.io.FileUtils
16 clean.doFirst {
17 FileUtils.deleteQuietly(new File(’path/to/gen/files’))
18 }
Hmmm
What’s going on here?
Let’s have a closer look
1 //apply the java plugin as before
2 apply plugin:’java’
3 //introduce a new task (that invokes a java process)
4 task generateFiles(type: JavaExec) {
5 main = ’some.class.name’
6 classpath = sourceSets.main.runtimeClasspath
7 args = [ projectDir, ’path/to/gen/files’ ]
8 }
9 //customize the test task
10 test {
11 dependsOn generateFiles
12 doLast {
13 ant.copy(toDir:’build/test−classes’){
14 fileset dir:’path/to/gen/files’
15 }
16 }
17 }
18 //import a class required by this build script
19 //some necessary classpath definitions are not shown for brevity
20 import org.apache.commons.io.FileUtils
21 //customize the clean task
22 clean.doFirst {
23 FileUtils.deleteQuietly(new File(’path/to/gen/files’))
24 }
Hmmm
What’s that strange syntax?
It’s Groovy!
groovy-lang.org
The Gradle DSL
Gradle’s power lies in its Groovy-based DSL
What you need to know about Groovy to start using Gradle in its full
potential
For more Groovy magic, have a look at:
An Introduction to Groovy for Java Developers
What is Groovy?
Groovy is a feature-rich, Java-friendly language for the JVM
A super version of Java
Augments Java with additional features
Designed as a companion language for Java
seamless integration with Java → an additional jar at runtime!
syntactically aligned with Java → syntactically correct Java will
work in Groovy (with some gotchas)!
compiles into JVM bytecode and preserves Java semantics → call
Groovy from Java == call Java from Java!
the 2nd language targeting the Java platform (JSR-241) →
Java was the first!
Groovy Scripts
Java
1 public class Booh {
2 public static void main(String[] args) {
3 System.out.println(”Booh booh”);
4 }
5 }
Compile and run it.
Groovy
1 println(”Booh booh”)
Run it directy.
POJOs vs POGOs
Java
1 public class Foo {
2 private String message;
3 public void setMessage(String message) {
4 this.message = message;
5 }
6 public String getMessage() {
7 return message;
8 }
9 }
Groovy
1 class Foo {
2 String message
3 }
Groovy Map Syntax
Java
1 Map<String, String> pairs = new HashMap();
2 pairs.put(”one”, ”1”);
3 pairs.put(”two”, ”2”);
Groovy
1 Map<String, String> pairs = [one:’1’, two:”2”]
Groovy Operator Overloading
1 import java.util.concurrent.*
2 class Tasks {
3 List<Callable> taskList = []
4 void execute() {
5 for(Callable t: taskList) {
6 t.run()
7 }
8 }
9 void leftShift(Tasks tasks) {
10 taskList.addAll(tasks.taskList)
11 }
12 }
13 Tasks t1 = new Tasks()
14 ...
15 Tasks t2 = new Tasks()
16 ...
17 t1 << t2
Groovy Closures
A closure is an anonymous function together with a referencing
environment.
may accept parameters or return a value,
can be assigned to variables,
can be passed as argument,
captures the variables of its surrounding lexical scope.
Example
1 class Test {
2 long x = 3
3 //a block of code assigned to a variable
4 Closure<Long> times = { long l −> l * x }
5 //x is the free variable
6 }
7 Test test = new Test()
8 assert test.times(3) == 9
9 test.x = 4
10 assert test.times(3) == 12
11 class Test2 {
12 long x = 0
13 }
14 test.times.resolveStrategy = Closure.DELEGATE_FIRST
15 test.times.delegate = new Test2()
16 assert test.times(3) == 0
Groovy method invocation syntax
1 //omit parentheses
2 println(”booh booh”)
3 println ”booh booh”
4 method ”one”, 2
5 //omit map’s braces
6 method([one:1, two: 2])
7 method(one:1, two:2)
8 method one:1, two:2
9 //The closure as last argument pattern
10 Closure clos = { int x, int y −> x + y }
11 method(”one”, 2, clos)
12 method ”one”, 2, clos
13 method(”one”, 2) { int x, int y −>
14 x + y
15 }
Back to Gradle
Behind the scenes
Gradle build scripts are Groovy scripts.
Such Groovy scripts operate in the context of Gradle’s domain
objects (DSL objects).
The main DSL object is a org.gradle.api.Project instance.
There is one-to-one relationship between a Projet object and a
build.gradle file.
Each DSL object exposes its own properties and methods.
Have a look at: Gradle DSL Reference
Putting it all together
Epiphany
1 //a groovy script with a Project object as the context
2 apply plugin: ”java”
3 //invocation of Project.apply(Map) method
4 group = ”org.foo.something”
5 version = ”1.0−SNAPSHOT”
6 //update of project.group, project.version properties
7 repositories {
8 mavenCentral()
9 }
10 //invocation of the Project.repositories(Closure) method
11 //From the docs: the closure has a RepositoryHandler object
12 //as its delegate
13 dependencies {
14 compile ”commons−io:commons−io:2.4”
15 testCompile ”junit:junit:4.11”
16 runtime files(”lib/foo.jar”, ”lib/bar.jar”)
17 }
18 //here?
Quiz
And here?
1 apply plugin:’java’
2 task generateFiles(type: JavaExec) {
3 main = ’some.class.name’
4 classpath = sourceSets.main.runtimeClasspath
5 args = [ projectDir, ’path/to/gen/files’ ]
6 }
7 test {
8 dependsOn generateFiles
9 doLast {
10 ant.copy(toDir:’build/test−classes’){
11 fileset dir:’path/to/gen/files’
12 }
13 }
14 }
15 import org.apache.commons.io.FileUtils
16 clean.doFirst {
17 FileUtils.deleteQuietly(new File(’path/to/gen/files’))
18 }
Build lifecycle
Configuration vs Execution Phase
1 test {//closure runs at configuration phase
2 dependsOn generateFiles
3 doLast { //at execution phase
4 ant.copy(toDir:’build/test−classes’){
5 fileset dir:’path/to/gen/files’
6 }
7 }
8 }
9 test.doLast { //at execution phase
10 ant.copy...
11 }
12 task test << { //at execution phase
13 ant.copy...
14 }
15 test { //at configuration phase
16 ant.copy...
17 }
18 task test { //at configuration phase
19 ant.copy...
20 }
Thank you
Questions?
Proudly powered by:
LATEX
Using the Beamer class &
the Wronki theme (slightly modified).

Contenu connexe

Tendances

Mocking in Java with Mockito
Mocking in Java with MockitoMocking in Java with Mockito
Mocking in Java with MockitoRichard Paul
 
Advanced Reflection in Java
Advanced Reflection in JavaAdvanced Reflection in Java
Advanced Reflection in Javakim.mens
 
Basics of reflection in java
Basics of reflection in javaBasics of reflection in java
Basics of reflection in javakim.mens
 
Connecting Connect with Spring Boot
Connecting Connect with Spring BootConnecting Connect with Spring Boot
Connecting Connect with Spring BootVincent Kok
 
Memory Management in the Java Virtual Machine(Garbage collection)
Memory Management in the Java Virtual Machine(Garbage collection)Memory Management in the Java Virtual Machine(Garbage collection)
Memory Management in the Java Virtual Machine(Garbage collection)Prashanth Kumar
 
Modern Java Workshop
Modern Java WorkshopModern Java Workshop
Modern Java WorkshopSimon Ritter
 
Discover Quarkus and GraalVM
Discover Quarkus and GraalVMDiscover Quarkus and GraalVM
Discover Quarkus and GraalVMRomain Schlick
 
Introduction à l’intégration continue avec Jenkins
Introduction à l’intégration continue avec JenkinsIntroduction à l’intégration continue avec Jenkins
Introduction à l’intégration continue avec JenkinsEric Hogue
 
Jenkins Introduction
Jenkins IntroductionJenkins Introduction
Jenkins IntroductionPavan Gupta
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introductionJonathan Holloway
 

Tendances (20)

Mocking in Java with Mockito
Mocking in Java with MockitoMocking in Java with Mockito
Mocking in Java with Mockito
 
JUnit 5
JUnit 5JUnit 5
JUnit 5
 
Advanced Reflection in Java
Advanced Reflection in JavaAdvanced Reflection in Java
Advanced Reflection in Java
 
Basics of reflection in java
Basics of reflection in javaBasics of reflection in java
Basics of reflection in java
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Connecting Connect with Spring Boot
Connecting Connect with Spring BootConnecting Connect with Spring Boot
Connecting Connect with Spring Boot
 
Memory Management in the Java Virtual Machine(Garbage collection)
Memory Management in the Java Virtual Machine(Garbage collection)Memory Management in the Java Virtual Machine(Garbage collection)
Memory Management in the Java Virtual Machine(Garbage collection)
 
Nouveautés de java 8
Nouveautés de java 8Nouveautés de java 8
Nouveautés de java 8
 
Modern Java Workshop
Modern Java WorkshopModern Java Workshop
Modern Java Workshop
 
Discover Quarkus and GraalVM
Discover Quarkus and GraalVMDiscover Quarkus and GraalVM
Discover Quarkus and GraalVM
 
Introduction à l’intégration continue avec Jenkins
Introduction à l’intégration continue avec JenkinsIntroduction à l’intégration continue avec Jenkins
Introduction à l’intégration continue avec Jenkins
 
Jenkins tutorial
Jenkins tutorialJenkins tutorial
Jenkins tutorial
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Introduction to java 8 stream api
Introduction to java 8 stream apiIntroduction to java 8 stream api
Introduction to java 8 stream api
 
Junit
JunitJunit
Junit
 
Spring boot
Spring bootSpring boot
Spring boot
 
Jenkins Introduction
Jenkins IntroductionJenkins Introduction
Jenkins Introduction
 
Java 8 streams
Java 8 streamsJava 8 streams
Java 8 streams
 
Jenkins
JenkinsJenkins
Jenkins
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introduction
 

En vedette

Gradle - time for a new build
Gradle - time for a new buildGradle - time for a new build
Gradle - time for a new buildIgor Khotin
 
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!Corneil du Plessis
 
Javaone - Gradle: Harder, Better, Stronger, Faster
Javaone - Gradle: Harder, Better, Stronger, Faster Javaone - Gradle: Harder, Better, Stronger, Faster
Javaone - Gradle: Harder, Better, Stronger, Faster Andres Almiray
 
Gradle enabled android project
Gradle enabled android projectGradle enabled android project
Gradle enabled android projectShaka Huang
 
Gradle 2.Breaking stereotypes
Gradle 2.Breaking stereotypesGradle 2.Breaking stereotypes
Gradle 2.Breaking stereotypesStrannik_2013
 
Gradle 2.Write once, builde everywhere
Gradle 2.Write once, builde everywhereGradle 2.Write once, builde everywhere
Gradle 2.Write once, builde everywhereStrannik_2013
 
Top 10 reasons to migrate to Gradle
Top 10 reasons to migrate to GradleTop 10 reasons to migrate to Gradle
Top 10 reasons to migrate to GradleStrannik_2013
 
Git.From thorns to the stars
Git.From thorns to the starsGit.From thorns to the stars
Git.From thorns to the starsStrannik_2013
 
Android Gradle about using flavor
Android Gradle about using flavorAndroid Gradle about using flavor
Android Gradle about using flavorTed Liang
 
From Ant to Maven to Gradle a tale of CI tools for JVM
From Ant to Maven to Gradle a tale of CI tools for JVMFrom Ant to Maven to Gradle a tale of CI tools for JVM
From Ant to Maven to Gradle a tale of CI tools for JVMBucharest Java User Group
 
4. arteria carotida externa
4. arteria carotida externa4. arteria carotida externa
4. arteria carotida externaanatogral
 
Predicting the Future as a Service with Azure ML and R
Predicting the Future as a Service with Azure ML and R Predicting the Future as a Service with Azure ML and R
Predicting the Future as a Service with Azure ML and R Barbara Fusinska
 
남동구 라선거구 최승원
남동구 라선거구 최승원남동구 라선거구 최승원
남동구 라선거구 최승원승원 최
 
5. arteria carotida int.
5. arteria carotida int.5. arteria carotida int.
5. arteria carotida int.anatogral
 

En vedette (20)

Gradle by Example
Gradle by ExampleGradle by Example
Gradle by Example
 
Gradle
GradleGradle
Gradle
 
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 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!
 
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 enabled android project
Gradle enabled android projectGradle enabled android project
Gradle enabled android project
 
Gradle presentation
Gradle presentationGradle presentation
Gradle presentation
 
Building with Gradle
Building with GradleBuilding with Gradle
Building with Gradle
 
Gradle 2.Breaking stereotypes
Gradle 2.Breaking stereotypesGradle 2.Breaking stereotypes
Gradle 2.Breaking stereotypes
 
Gradle 2.Write once, builde everywhere
Gradle 2.Write once, builde everywhereGradle 2.Write once, builde everywhere
Gradle 2.Write once, builde everywhere
 
Top 10 reasons to migrate to Gradle
Top 10 reasons to migrate to GradleTop 10 reasons to migrate to Gradle
Top 10 reasons to migrate to Gradle
 
Git.From thorns to the stars
Git.From thorns to the starsGit.From thorns to the stars
Git.From thorns to the stars
 
Gradle
GradleGradle
Gradle
 
Android Gradle about using flavor
Android Gradle about using flavorAndroid Gradle about using flavor
Android Gradle about using flavor
 
From Ant to Maven to Gradle a tale of CI tools for JVM
From Ant to Maven to Gradle a tale of CI tools for JVMFrom Ant to Maven to Gradle a tale of CI tools for JVM
From Ant to Maven to Gradle a tale of CI tools for JVM
 
4. arteria carotida externa
4. arteria carotida externa4. arteria carotida externa
4. arteria carotida externa
 
Predicting the Future as a Service with Azure ML and R
Predicting the Future as a Service with Azure ML and R Predicting the Future as a Service with Azure ML and R
Predicting the Future as a Service with Azure ML and R
 
남동구 라선거구 최승원
남동구 라선거구 최승원남동구 라선거구 최승원
남동구 라선거구 최승원
 
5. arteria carotida int.
5. arteria carotida int.5. arteria carotida int.
5. arteria carotida int.
 
When the connection fails
When the connection failsWhen the connection fails
When the connection fails
 

Similaire à An Introduction to Gradle for Java Developers

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: GradleSkills Matter
 
Oscon Java Testing on the Fast Lane
Oscon Java Testing on the Fast LaneOscon Java Testing on the Fast Lane
Oscon Java Testing on the Fast LaneAndres Almiray
 
Apache Groovy: the language and the ecosystem
Apache Groovy: the language and the ecosystemApache Groovy: the language and the ecosystem
Apache Groovy: the language and the ecosystemKostas Saidis
 
GR8Conf 2009: What's New in Groovy 1.6? by Guillaume Laforge
GR8Conf 2009: What's New in Groovy 1.6? by Guillaume LaforgeGR8Conf 2009: What's New in Groovy 1.6? by Guillaume Laforge
GR8Conf 2009: What's New in Groovy 1.6? by Guillaume LaforgeGR8Conf
 
Using the Groovy Ecosystem for Rapid JVM Development
Using the Groovy Ecosystem for Rapid JVM DevelopmentUsing the Groovy Ecosystem for Rapid JVM Development
Using the Groovy Ecosystem for Rapid JVM DevelopmentSchalk Cronjé
 
Gradleintroduction 111010130329-phpapp01
Gradleintroduction 111010130329-phpapp01Gradleintroduction 111010130329-phpapp01
Gradleintroduction 111010130329-phpapp01Tino Isnich
 
Javaone2008 Bof 5101 Groovytesting
Javaone2008 Bof 5101 GroovytestingJavaone2008 Bof 5101 Groovytesting
Javaone2008 Bof 5101 GroovytestingAndres Almiray
 
Boosting Your Testing Productivity with Groovy
Boosting Your Testing Productivity with GroovyBoosting Your Testing Productivity with Groovy
Boosting Your Testing Productivity with GroovyJames Williams
 
10 Cool Facts about Gradle
10 Cool Facts about Gradle10 Cool Facts about Gradle
10 Cool Facts about GradleEvgeny Goldin
 
Gradle - Build system evolved
Gradle - Build system evolvedGradle - Build system evolved
Gradle - Build system evolvedBhagwat Kumar
 
淺談 Groovy 與 AWS 雲端應用開發整合
淺談 Groovy 與 AWS 雲端應用開發整合淺談 Groovy 與 AWS 雲端應用開發整合
淺談 Groovy 與 AWS 雲端應用開發整合Kyle Lin
 
Java 9 features
Java 9 featuresJava 9 features
Java 9 featuresshrinath97
 
GTAC Boosting your Testing Productivity with Groovy
GTAC Boosting your Testing Productivity with GroovyGTAC Boosting your Testing Productivity with Groovy
GTAC Boosting your Testing Productivity with GroovyAndres Almiray
 
Groovy and Grails in Action - Devoxx 2008 - University - Guillaume Laforge
Groovy and Grails in Action - Devoxx 2008 - University - Guillaume LaforgeGroovy and Grails in Action - Devoxx 2008 - University - Guillaume Laforge
Groovy and Grails in Action - Devoxx 2008 - University - Guillaume LaforgeGuillaume Laforge
 
Gradle in 45min - JBCN2-16 version
Gradle in 45min - JBCN2-16 versionGradle in 45min - JBCN2-16 version
Gradle in 45min - JBCN2-16 versionSchalk Cronjé
 
Groovy a Scripting Language for Java
Groovy a Scripting Language for JavaGroovy a Scripting Language for Java
Groovy a Scripting Language for JavaCharles Anderson
 
Taming Functional Web Testing with Spock and Geb
Taming Functional Web Testing with Spock and GebTaming Functional Web Testing with Spock and Geb
Taming Functional Web Testing with Spock and GebC4Media
 
Gradle in a Polyglot World
Gradle in a Polyglot WorldGradle in a Polyglot World
Gradle in a Polyglot WorldSchalk Cronjé
 

Similaire à An Introduction to Gradle for Java Developers (20)

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
 
Oscon Java Testing on the Fast Lane
Oscon Java Testing on the Fast LaneOscon Java Testing on the Fast Lane
Oscon Java Testing on the Fast Lane
 
Apache Groovy: the language and the ecosystem
Apache Groovy: the language and the ecosystemApache Groovy: the language and the ecosystem
Apache Groovy: the language and the ecosystem
 
What's New in Groovy 1.6?
What's New in Groovy 1.6?What's New in Groovy 1.6?
What's New in Groovy 1.6?
 
GR8Conf 2009: What's New in Groovy 1.6? by Guillaume Laforge
GR8Conf 2009: What's New in Groovy 1.6? by Guillaume LaforgeGR8Conf 2009: What's New in Groovy 1.6? by Guillaume Laforge
GR8Conf 2009: What's New in Groovy 1.6? by Guillaume Laforge
 
Using the Groovy Ecosystem for Rapid JVM Development
Using the Groovy Ecosystem for Rapid JVM DevelopmentUsing the Groovy Ecosystem for Rapid JVM Development
Using the Groovy Ecosystem for Rapid JVM Development
 
Gradleintroduction 111010130329-phpapp01
Gradleintroduction 111010130329-phpapp01Gradleintroduction 111010130329-phpapp01
Gradleintroduction 111010130329-phpapp01
 
Javaone2008 Bof 5101 Groovytesting
Javaone2008 Bof 5101 GroovytestingJavaone2008 Bof 5101 Groovytesting
Javaone2008 Bof 5101 Groovytesting
 
Boosting Your Testing Productivity with Groovy
Boosting Your Testing Productivity with GroovyBoosting Your Testing Productivity with Groovy
Boosting Your Testing Productivity with Groovy
 
10 Cool Facts about Gradle
10 Cool Facts about Gradle10 Cool Facts about Gradle
10 Cool Facts about Gradle
 
Gradle - Build system evolved
Gradle - Build system evolvedGradle - Build system evolved
Gradle - Build system evolved
 
淺談 Groovy 與 AWS 雲端應用開發整合
淺談 Groovy 與 AWS 雲端應用開發整合淺談 Groovy 與 AWS 雲端應用開發整合
淺談 Groovy 與 AWS 雲端應用開發整合
 
Java 9 features
Java 9 featuresJava 9 features
Java 9 features
 
GTAC Boosting your Testing Productivity with Groovy
GTAC Boosting your Testing Productivity with GroovyGTAC Boosting your Testing Productivity with Groovy
GTAC Boosting your Testing Productivity with Groovy
 
Groovy and Grails in Action - Devoxx 2008 - University - Guillaume Laforge
Groovy and Grails in Action - Devoxx 2008 - University - Guillaume LaforgeGroovy and Grails in Action - Devoxx 2008 - University - Guillaume Laforge
Groovy and Grails in Action - Devoxx 2008 - University - Guillaume Laforge
 
Gradle in 45min - JBCN2-16 version
Gradle in 45min - JBCN2-16 versionGradle in 45min - JBCN2-16 version
Gradle in 45min - JBCN2-16 version
 
Groovy a Scripting Language for Java
Groovy a Scripting Language for JavaGroovy a Scripting Language for Java
Groovy a Scripting Language for Java
 
Griffon Presentation
Griffon PresentationGriffon Presentation
Griffon Presentation
 
Taming Functional Web Testing with Spock and Geb
Taming Functional Web Testing with Spock and GebTaming Functional Web Testing with Spock and Geb
Taming Functional Web Testing with Spock and Geb
 
Gradle in a Polyglot World
Gradle in a Polyglot WorldGradle in a Polyglot World
Gradle in a Polyglot World
 

Dernier

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 

Dernier (20)

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 

An Introduction to Gradle for Java Developers

  • 1. An Introduction to Gradle for Java Developers Kostas Saidis www.niovity.com Java Hellenic User Group Meetup April 2, 2016
  • 2. About Me Kostas Saidis saiko@niovity.com Software & Data Architect Twitter: @saikos Linkedin: http://gr.linkedin.com/in/saiko Academia BSc @ cs.unipi.gr (2001) MSc @ di.uoa.gr (2004) PhD @ di.uoa.gr (2011) Industry Freelance consultant, developer & instructor since 1999 Enterpreneur since 2011 (niovity) Java Early Java enthusiast (1997) Groovyist since 2011
  • 3. Using Gradle Building software with Gradle Since version 0.9 Fifteen real-life projects with team sizes ranging from 2 to 10 members Custom plugin authoring
  • 4. Target audience Java developers with little or no experience in Gradle or another build tool.
  • 6. Software build tools Tools for managing and automating the software build process.
  • 7. Software what? Building software sucks! (big time) Software build process Develop Test Assemble Deploy Integrate Repeat Again and again and again
  • 8. What is Gradle? Gradle is one of the finest software build tools out there Makes the software build process easier to setup, extend and maintain
  • 9. In this presentation We focus on understanding Gradle Gradle is a superb piece of software What makes it so great? No flame wars No feature comparison with other tools
  • 10. At a glance Gradle Open source: Apache License v2 First release 2009, latest release March 2016 (2.12) Backed by Gradleware... ooops, I mean Gradle Inc Used by: Android, Spring IO, Linkedin, Netflix, Twitter and more...
  • 11. At a glance Gradle Combines the best of Ant, Ivy and Maven Cross-platform file management Dependency management Conventions In a smart and extensible way Deep API Groovy DSL Easy-to-write plugins Ultimately offering Clean and elegant builds Plenty of new features Better build management
  • 12. Features Non exhaustive list Full-fledged programmability Both declarative and imperative Convention over configuration Transitive dependency management Multi-project builds Polyglot (not only Java) Numerous plugins and integrations Incremental and parallel execution Reporting and analytics Embeddable Great documentation
  • 13. The most distinct features IMHO 1. Its superb design and technical sophistication. 2. The exposure and manipulation of its “internal” Java APIs through Groovy (aka the Groovy DSL).
  • 14. A simple example A simple Java project 1 apply plugin: ”java” 2 group = ”org.foo.something” 3 version = ”1.0−SNAPSHOT” 4 repositories { 5 mavenCentral() 6 } 7 dependencies { 8 compile ”commons−io:commons−io:2.4” 9 testCompile ”junit:junit:4.11” 10 runtime files(”lib/foo.jar”, ”lib/bar.jar”) 11 } The contents of build.gradle (aka the build script), placed in the root folder of the project.
  • 15. Core Concepts Build script: a build configuration script supporting one or more projects. Project: a component that needs to be built. It is made up of one or more tasks. Task: a distinct step required to perform the build. Each task/step is atomic (either succeeds or fails). Publication: the artifact produced by the build process.
  • 16. Dependency Resolution Dependencies: tasks and projects depending on each other (internal) or on third-party artifacts (external). Transitive dependencies: the dependencies of a project may themselves have dependencies. Repositories: the “places” that hold external dependencies (Maven/Ivy repos, local folders). DAG: the directed acyclic graph of dependencies (what depends on what). Dependency configurations : named sets (groups) of dependencies (e.g. per task).
  • 17. Plugins A plugin applies a set of extensions to the build process. Add taks to a project. Pre-configure these tasks with reasonable defaults. Add dependency configurations. Add new properties and methods to existing objects. Plugins implement the “build-by-convention” principle in a flexible way.
  • 18. The Build Lifecycle 1. Initialization: initialization of the project. 2. Configuration: configuration of the project (computes the DAG). 3. Execution: executes the sequence of build tasks.
  • 19. The simple example 1 apply plugin: ”java” 2 //Introduces a set of Maven−style conventions 3 //(tasks, source locations, dependency configurations, etc) 4 group = ”org.foo.something” 5 version = ”1.0−SNAPSHOT” 6 repositories { 7 //resolve all external dependencies via Maven central 8 mavenCentral() 9 } 10 dependencies { 11 //each name (compile, testCompile, etc) refers to 12 //a configuration introduced by the java plugin 13 compile ”commons−io:commons−io:2.4” 14 testCompile ”junit:junit:4.11” 15 runtime files(”lib/foo.jar”, ”lib/bar.jar”) 16 }
  • 20. Invoking gradle Run a build task > gradle test Compiles the sources and runs the tests > gradle tasks clean, assemble, build, classes, testClasses, test, jar, etc Never invoke gradle directly but always use the gradle wrapper: a mechanism to execute gradle without manually installing it beforehand (not covered here).
  • 21. A more complex example Ant integration, custom tasks 1 apply plugin:’java’ 2 task generateFiles(type: JavaExec) { 3 main = ’some.class.name’ 4 classpath = sourceSets.main.runtimeClasspath 5 args = [ projectDir, ’path/to/gen/files’ ] 6 } 7 test { 8 dependsOn generateFiles 9 doLast { 10 ant.copy(toDir:’build/test−classes’){ 11 fileset dir:’path/to/gen/files’ 12 } 13 } 14 } 15 import org.apache.commons.io.FileUtils 16 clean.doFirst { 17 FileUtils.deleteQuietly(new File(’path/to/gen/files’)) 18 }
  • 23. Let’s have a closer look 1 //apply the java plugin as before 2 apply plugin:’java’ 3 //introduce a new task (that invokes a java process) 4 task generateFiles(type: JavaExec) { 5 main = ’some.class.name’ 6 classpath = sourceSets.main.runtimeClasspath 7 args = [ projectDir, ’path/to/gen/files’ ] 8 } 9 //customize the test task 10 test { 11 dependsOn generateFiles 12 doLast { 13 ant.copy(toDir:’build/test−classes’){ 14 fileset dir:’path/to/gen/files’ 15 } 16 } 17 } 18 //import a class required by this build script 19 //some necessary classpath definitions are not shown for brevity 20 import org.apache.commons.io.FileUtils 21 //customize the clean task 22 clean.doFirst { 23 FileUtils.deleteQuietly(new File(’path/to/gen/files’)) 24 }
  • 26. The Gradle DSL Gradle’s power lies in its Groovy-based DSL What you need to know about Groovy to start using Gradle in its full potential For more Groovy magic, have a look at: An Introduction to Groovy for Java Developers
  • 27. What is Groovy? Groovy is a feature-rich, Java-friendly language for the JVM A super version of Java Augments Java with additional features Designed as a companion language for Java seamless integration with Java → an additional jar at runtime! syntactically aligned with Java → syntactically correct Java will work in Groovy (with some gotchas)! compiles into JVM bytecode and preserves Java semantics → call Groovy from Java == call Java from Java! the 2nd language targeting the Java platform (JSR-241) → Java was the first!
  • 28. Groovy Scripts Java 1 public class Booh { 2 public static void main(String[] args) { 3 System.out.println(”Booh booh”); 4 } 5 } Compile and run it. Groovy 1 println(”Booh booh”) Run it directy.
  • 29. POJOs vs POGOs Java 1 public class Foo { 2 private String message; 3 public void setMessage(String message) { 4 this.message = message; 5 } 6 public String getMessage() { 7 return message; 8 } 9 } Groovy 1 class Foo { 2 String message 3 }
  • 30. Groovy Map Syntax Java 1 Map<String, String> pairs = new HashMap(); 2 pairs.put(”one”, ”1”); 3 pairs.put(”two”, ”2”); Groovy 1 Map<String, String> pairs = [one:’1’, two:”2”]
  • 31. Groovy Operator Overloading 1 import java.util.concurrent.* 2 class Tasks { 3 List<Callable> taskList = [] 4 void execute() { 5 for(Callable t: taskList) { 6 t.run() 7 } 8 } 9 void leftShift(Tasks tasks) { 10 taskList.addAll(tasks.taskList) 11 } 12 } 13 Tasks t1 = new Tasks() 14 ... 15 Tasks t2 = new Tasks() 16 ... 17 t1 << t2
  • 32. Groovy Closures A closure is an anonymous function together with a referencing environment. may accept parameters or return a value, can be assigned to variables, can be passed as argument, captures the variables of its surrounding lexical scope.
  • 33. Example 1 class Test { 2 long x = 3 3 //a block of code assigned to a variable 4 Closure<Long> times = { long l −> l * x } 5 //x is the free variable 6 } 7 Test test = new Test() 8 assert test.times(3) == 9 9 test.x = 4 10 assert test.times(3) == 12 11 class Test2 { 12 long x = 0 13 } 14 test.times.resolveStrategy = Closure.DELEGATE_FIRST 15 test.times.delegate = new Test2() 16 assert test.times(3) == 0
  • 34. Groovy method invocation syntax 1 //omit parentheses 2 println(”booh booh”) 3 println ”booh booh” 4 method ”one”, 2 5 //omit map’s braces 6 method([one:1, two: 2]) 7 method(one:1, two:2) 8 method one:1, two:2 9 //The closure as last argument pattern 10 Closure clos = { int x, int y −> x + y } 11 method(”one”, 2, clos) 12 method ”one”, 2, clos 13 method(”one”, 2) { int x, int y −> 14 x + y 15 }
  • 35. Back to Gradle Behind the scenes Gradle build scripts are Groovy scripts. Such Groovy scripts operate in the context of Gradle’s domain objects (DSL objects). The main DSL object is a org.gradle.api.Project instance. There is one-to-one relationship between a Projet object and a build.gradle file. Each DSL object exposes its own properties and methods. Have a look at: Gradle DSL Reference
  • 36. Putting it all together Epiphany 1 //a groovy script with a Project object as the context 2 apply plugin: ”java” 3 //invocation of Project.apply(Map) method 4 group = ”org.foo.something” 5 version = ”1.0−SNAPSHOT” 6 //update of project.group, project.version properties 7 repositories { 8 mavenCentral() 9 } 10 //invocation of the Project.repositories(Closure) method 11 //From the docs: the closure has a RepositoryHandler object 12 //as its delegate 13 dependencies { 14 compile ”commons−io:commons−io:2.4” 15 testCompile ”junit:junit:4.11” 16 runtime files(”lib/foo.jar”, ”lib/bar.jar”) 17 } 18 //here?
  • 37. Quiz And here? 1 apply plugin:’java’ 2 task generateFiles(type: JavaExec) { 3 main = ’some.class.name’ 4 classpath = sourceSets.main.runtimeClasspath 5 args = [ projectDir, ’path/to/gen/files’ ] 6 } 7 test { 8 dependsOn generateFiles 9 doLast { 10 ant.copy(toDir:’build/test−classes’){ 11 fileset dir:’path/to/gen/files’ 12 } 13 } 14 } 15 import org.apache.commons.io.FileUtils 16 clean.doFirst { 17 FileUtils.deleteQuietly(new File(’path/to/gen/files’)) 18 }
  • 38. Build lifecycle Configuration vs Execution Phase 1 test {//closure runs at configuration phase 2 dependsOn generateFiles 3 doLast { //at execution phase 4 ant.copy(toDir:’build/test−classes’){ 5 fileset dir:’path/to/gen/files’ 6 } 7 } 8 } 9 test.doLast { //at execution phase 10 ant.copy... 11 } 12 task test << { //at execution phase 13 ant.copy... 14 } 15 test { //at configuration phase 16 ant.copy... 17 } 18 task test { //at configuration phase 19 ant.copy... 20 }
  • 39. Thank you Questions? Proudly powered by: LATEX Using the Beamer class & the Wronki theme (slightly modified).