SlideShare a Scribd company logo
1 of 42
Hans Dockter
CEO, Gradleware
Founder Gradle
hans.dockter@gradleware.com
The Art Of Builds
InfoQ.com: News & Community Site
• 750,000 unique visitors/month
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• News 15-20 / week
• Articles 3-4 / week
• Presentations (videos) 12-15 / week
• Interviews 2-3 / week
• Books 1 / month
Watch the video with slide
synchronization on InfoQ.com!
http://www.infoq.com/presentations
/build-system-concepts
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
Presented at QCon San Francisco
www.qconsf.com
Executional
Model
<target name="jar" depends="foo">
<mkdir dir="build/jar"/>
<jar destfile="build/HelloWorld.jar" basedir="build/classes">
<manifest>
<attribute name="Main-Class" value="oata.HelloWorld"/>
</manifest>
</jar>
</target>
task myDist(type: Jar) {
from jar, "readme.txt", "distributionDir"
}
assemble.dependsOn myDist // This wiring could be done automatically
<project>
[...]
<build>
[...]
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
<descriptors>
//even more lines of code in the assemble descriptor
<descriptor>src/main/assembly/src.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
[...]
</project>
Integration Tests
(5 mins)
Jar
Documentation
(5 mins)
Distribution
Generate
License Key
(1 sec)
<target name="dist" depends=“integrationTests, docs, jar, key”>
...
</target>
<target name="distDE" depends=“integrationTests, docs, jar, key”>
...
</target>
docs.shouldRunAfter integrationTests
Upload Check
Build
upload.mustRunAfter checks
Start Local
Server
Stop Local
Server
Integration
Tests
<target name="integrationTestAll" depends=“startServer,
integrationTests, stopServer”>
...
</target>
integrationTests.finalizedBy stopServer
IMPERATIVe!
Declarative
<project>
[...]
<packaging>war</packaging>
[...]
</project>
-src
--main
---java
--integrationTests
---java
Separate Project
Failsafe
Frameworkitis!
apply plugin: 'war'
sourceSets {
integTest {
java.srcDir file('src/integration-test/java')
resources.srcDir file('src/integration-test/resources')
compileClasspath = sourceSets.main.output + configurations.integTest
runtimeClasspath = output + compileClasspath
}
}
// integration test plugin
configurations {
integTest.extendsFrom testRuntime
}
sourceSets {
integTest {
java.srcDir file('src/integration-test/java')
resources.srcDir file('src/integration-test/resources')
compileClasspath = sourceSets.main.output + configurations.integTest
runtimeClasspath = output + compileClasspath
}
}
task integrationTest(type: Test) {
group = 'verify'
testClassesDir = sourceSets.integTest.output.classesDir
classpath = sourceSets.integTest.runtimeClasspath
}
check.dependsOn integrationTest
apply plugin: 'java'
apply plugin: 'integration-test'
dependencies {
[...]
integTest "xmlunit:xmlunit:3.0"
}
apply plugin: 'java'
apply plugin: 'integration-test'
dependencies {
[...]
integTest "xmlunit:xmlunit:3.0"
}
apply plugin: 'java'
apply plugin: 'integration-test'
integrationTests {
db {
maxParallelForks = 1
}
ui {
maxParallelForks = 4
}
}
// integration test plugin
// define integrationTests declarative element …
...
apply plugin: 'android'
android {
compileSdkVersion 15
flavorGroups "abi", "version"
productFlavors {
arm {
flavorGroup "abi"
}
x86 {
flavorGroup "abi"
}
free {
flavorGroup "version"
packageName = "com.android.tests.flavored.free"
versionName = "2.0.0-free"
}
paid {
flavorGroup "version"
packageName = "com.android.tests.flavored.paid"
versionName = "1.0.0-paid"
}
}
}
Android tasks
-------------
androidDependencies - Displays the Android dependencies of the project
signingReport - Displays the signing info for each variant
Build tasks
-----------
assemble - Assembles all variants of all applications and secondary packages. [assembleArmFree, assembleArmPaid, assembleDebug, assembleRelease, assembleX86Free, assembleX86Paid]
assembleArmFree - Assembles all builds for flavor ArmFree [assembleArmFreeDebug, assembleArmFreeRelease]
assembleArmFreeDebug - Assembles the Debug build for flavor ArmFree
compileArmFreeDebug
compileArmFreeDebugAidl
compileArmFreeDebugRenderscript
dexArmFreeDebug
generateArmFreeDebugBuildConfig
mergeArmFreeDebugAssets
mergeArmFreeDebugResources
packageArmFreeDebug
prepareArmFreeDebugDependencies
processArmFreeDebugJavaRes
processArmFreeDebugManifest
processArmFreeDebugResources
validateDebugSigning
assembleArmFreeRelease - Assembles the Release build for flavor ArmFree
compileArmFreeRelease
compileArmFreeReleaseAidl
compileArmFreeReleaseRenderscript
dexArmFreeRelease
generateArmFreeReleaseBuildConfig
mergeArmFreeReleaseAssets
mergeArmFreeReleaseResources
packageArmFreeRelease
prepareArmFreeReleaseDependencies
processArmFreeReleaseJavaRes
processArmFreeReleaseManifest
processArmFreeReleaseResources
assembleArmFreeTest - Assembles the Test build for the ArmFreeDebug build
compileArmFreeDebug
compileArmFreeDebugAidl
compileArmFreeDebugRenderscript
compileArmFreeTest
compileArmFreeTestAidl
compileArmFreeTestRenderscript
dexArmFreeTest
generateArmFreeDebugBuildConfig
generateArmFreeTestBuildConfig
mergeArmFreeDebugAssets
mergeArmFreeDebugResources
mergeArmFreeTestAssets
mergeArmFreeTestResources
packageArmFreeTest
prepareArmFreeDebugDependencies
prepareArmFreeTestDependencies
processArmFreeDebugManifest
processArmFreeDebugResources
processArmFreeTestJavaRes
processArmFreeTestResources
processArmFreeTestTestManifest
validateDebugSigning
assembleArmPaid - Assembles all builds for flavor ArmPaid [assembleArmPaidDebug, assembleArmPaidRelease]
assembleArmPaidDebug - Assembles the Debug build for flavor ArmPaid
compileArmPaidDebug
compileArmPaidDebugAidl
compileArmPaidDebugRenderscript
dexArmPaidDebug
generateArmPaidDebugBuildConfig
mergeArmPaidDebugAssets
mergeArmPaidDebugResources
packageArmPaidDebug
prepareArmPaidDebugDependencies
processArmPaidDebugJavaRes
processArmPaidDebugManifest
processArmPaidDebugResources
validateDebugSigning
assembleArmPaidRelease - Assembles the Release build for flavor ArmPaid
compileArmPaidRelease
compileArmPaidReleaseAidl
compileArmPaidReleaseRenderscript
dexArmPaidRelease
generateArmPaidReleaseBuildConfig
mergeArmPaidReleaseAssets
mergeArmPaidReleaseResources
packageArmPaidRelease
prepareArmPaidReleaseDependencies
processArmPaidReleaseJavaRes
processArmPaidReleaseManifest
processArmPaidReleaseResources
assembleArmPaidTest - Assembles the Test build for the ArmPaidDebug build
compileArmPaidDebug
compileArmPaidDebugAidl
compileArmPaidDebugRenderscript
compileArmPaidTest
compileArmPaidTestAidl
compileArmPaidTestRenderscript
dexArmPaidTest
generateArmPaidDebugBuildConfig
generateArmPaidTestBuildConfig
mergeArmPaidDebugAssets
mergeArmPaidDebugResources
mergeArmPaidTestAssets
mergeArmPaidTestResources
packageArmPaidTest
prepareArmPaidDebugDependencies
prepareArmPaidTestDependencies
processArmPaidDebugManifest
processArmPaidDebugResources
processArmPaidTestJavaRes
processArmPaidTestResources
processArmPaidTestTestManifest
validateDebugSigning
assembleDebug - Assembles all Debug builds [assembleArmFreeDebug, assembleArmPaidDebug, assembleX86FreeDebug, assembleX86PaidDebug]
assembleRelease - Assembles all Release builds [assembleArmFreeRelease, assembleArmPaidRelease, assembleX86FreeRelease, assembleX86PaidRelease]
assembleTest - Assembles all the Test applications [assembleArmFreeTest, assembleArmPaidTest, assembleX86FreeTest, assembleX86PaidTest]
assembleX86Free - Assembles all builds for flavor X86Free [assembleX86FreeDebug, assembleX86FreeRelease]
assembleX86FreeDebug - Assembles the Debug build for flavor X86Free
compileX86FreeDebug
compileX86FreeDebugAidl
compileX86FreeDebugRenderscript
dexX86FreeDebug
generateX86FreeDebugBuildConfig
mergeX86FreeDebugAssets
mergeX86FreeDebugResources
packageX86FreeDebug
prepareX86FreeDebugDependencies
processX86FreeDebugJavaRes
processX86FreeDebugManifest
processX86FreeDebugResources
validateDebugSigning
assembleX86FreeRelease - Assembles the Release build for flavor X86Free
compileX86FreeRelease
compileX86FreeReleaseAidl
compileX86FreeReleaseRenderscript
dexX86FreeRelease
generateX86FreeReleaseBuildConfig
mergeX86FreeReleaseAssets
mergeX86FreeReleaseResources
packageX86FreeRelease
prepareX86FreeReleaseDependencies
processX86FreeReleaseJavaRes
processX86FreeReleaseManifest
processX86FreeReleaseResources
assembleX86FreeTest - Assembles the Test build for the X86FreeDebug build
compileX86FreeDebug
compileX86FreeDebugAidl
compileX86FreeDebugRenderscript
compileX86FreeTest
compileX86FreeTestAidl
compileX86FreeTestRenderscript
dexX86FreeTest
generateX86FreeDebugBuildConfig
generateX86FreeTestBuildConfig
mergeX86FreeDebugAssets
mergeX86FreeDebugResources
mergeX86FreeTestAssets
mergeX86FreeTestResources
packageX86FreeTest
prepareX86FreeDebugDependencies
prepareX86FreeTestDependencies
processX86FreeDebugManifest
processX86FreeDebugResources
processX86FreeTestJavaRes
processX86FreeTestResources
processX86FreeTestTestManifest
validateDebugSigning
assembleX86Paid - Assembles all builds for flavor X86Paid [assembleX86PaidDebug, assembleX86PaidRelease]
assembleX86PaidDebug - Assembles the Debug build for flavor X86Paid
compileX86PaidDebug
compileX86PaidDebugAidl
compileX86PaidDebugRenderscript
dexX86PaidDebug
generateX86PaidDebugBuildConfig
mergeX86PaidDebugAssets
mergeX86PaidDebugResources
packageX86PaidDebug
prepareX86PaidDebugDependencies
processX86PaidDebugJavaRes
processX86PaidDebugManifest
processX86PaidDebugResources
validateDebugSigning
assembleX86PaidRelease - Assembles the Release build for flavor X86Paid
compileX86PaidRelease
compileX86PaidReleaseAidl
compileX86PaidReleaseRenderscript
dexX86PaidRelease
generateX86PaidReleaseBuildConfig
mergeX86PaidReleaseAssets
mergeX86PaidReleaseResources
packageX86PaidRelease
prepareX86PaidReleaseDependencies
processX86PaidReleaseJavaRes
processX86PaidReleaseManifest
processX86PaidReleaseResources
assembleX86PaidTest - Assembles the Test build for the X86PaidDebug build
compileX86PaidDebug
compileX86PaidDebugAidl
compileX86PaidDebugRenderscript
compileX86PaidTest
compileX86PaidTestAidl
compileX86PaidTestRenderscript
dexX86PaidTest
generateX86PaidDebugBuildConfig
generateX86PaidTestBuildConfig
mergeX86PaidDebugAssets
mergeX86PaidDebugResources
mergeX86PaidTestAssets
mergeX86PaidTestResources
packageX86PaidTest
prepareX86PaidDebugDependencies
prepareX86PaidTestDependencies
processX86PaidDebugManifest
processX86PaidDebugResources
processX86PaidTestJavaRes
processX86PaidTestResources
processX86PaidTestTestManifest
validateDebugSigning
build - Assembles and tests this project. [assemble, check]
buildDependents - Assembles and tests this project and all projects that depend on it. [build]
buildNeeded - Assembles and tests this project and all projects it depends on. [build]
clean - Deletes the build directory.
Help tasks
----------
dependencies - Displays all dependencies declared in root project 'flavors'.
dependencyInsight - Displays the insight into a specific dependency in root project 'flavors'.
help - Displays a help message
projects - Displays the sub-projects of root project 'flavors'.
properties - Displays the properties of root project 'flavors'.
tasks - Displays the tasks runnable from root project 'flavors' (some of the displayed tasks may belong to subprojects).
Install tasks
-------------
installArmFreeDebug - Installs the Debug build for flavor ArmFree
compileArmFreeDebug
compileArmFreeDebugAidl
compileArmFreeDebugRenderscript
dexArmFreeDebug
generateArmFreeDebugBuildConfig
mergeArmFreeDebugAssets
mergeArmFreeDebugResources
packageArmFreeDebug
prepareArmFreeDebugDependencies
processArmFreeDebugJavaRes
processArmFreeDebugManifest
processArmFreeDebugResources
validateDebugSigning
installArmFreeTest - Installs the Test build for the ArmFreeDebug build
compileArmFreeDebug
compileArmFreeDebugAidl
compileArmFreeDebugRenderscript
compileArmFreeTest
compileArmFreeTestAidl
compileArmFreeTestRenderscript
dexArmFreeTest
generateArmFreeDebugBuildConfig
generateArmFreeTestBuildConfig
mergeArmFreeDebugAssets
mergeArmFreeDebugResources
mergeArmFreeTestAssets
mergeArmFreeTestResources
packageArmFreeTest
prepareArmFreeDebugDependencies
prepareArmFreeTestDependencies
processArmFreeDebugManifest
processArmFreeDebugResources
processArmFreeTestJavaRes
processArmFreeTestResources
processArmFreeTestTestManifest
validateDebugSigning
installArmPaidDebug - Installs the Debug build for flavor ArmPaid
compileArmPaidDebug
compileArmPaidDebugAidl
compileArmPaidDebugRenderscript
dexArmPaidDebug
generateArmPaidDebugBuildConfig
mergeArmPaidDebugAssets
mergeArmPaidDebugResources
packageArmPaidDebug
prepareArmPaidDebugDependencies
processArmPaidDebugJavaRes
processArmPaidDebugManifest
processArmPaidDebugResources
validateDebugSigning
installArmPaidTest - Installs the Test build for the ArmPaidDebug build
compileArmPaidDebug
compileArmPaidDebugAidl
compileArmPaidDebugRenderscript
compileArmPaidTest
compileArmPaidTestAidl
compileArmPaidTestRenderscript
dexArmPaidTest
generateArmPaidDebugBuildConfig
generateArmPaidTestBuildConfig
mergeArmPaidDebugAssets
mergeArmPaidDebugResources
mergeArmPaidTestAssets
mergeArmPaidTestResources
packageArmPaidTest
prepareArmPaidDebugDependencies
prepareArmPaidTestDependencies
processArmPaidDebugManifest
processArmPaidDebugResources
processArmPaidTestJavaRes
processArmPaidTestResources
processArmPaidTestTestManifest
validateDebugSigning
installX86FreeDebug - Installs the Debug build for flavor X86Free
compileX86FreeDebug
compileX86FreeDebugAidl
compileX86FreeDebugRenderscript
dexX86FreeDebug
generateX86FreeDebugBuildConfig
mergeX86FreeDebugAssets
mergeX86FreeDebugResources
packageX86FreeDebug
prepareX86FreeDebugDependencies
processX86FreeDebugJavaRes
processX86FreeDebugManifest
processX86FreeDebugResources
validateDebugSigning
installX86FreeTest - Installs the Test build for the X86FreeDebug build
compileX86FreeDebug
compileX86FreeDebugAidl
compileX86FreeDebugRenderscript
compileX86FreeTest
compileX86FreeTestAidl
compileX86FreeTestRenderscript
dexX86FreeTest
generateX86FreeDebugBuildConfig
generateX86FreeTestBuildConfig
mergeX86FreeDebugAssets
mergeX86FreeDebugResources
mergeX86FreeTestAssets
mergeX86FreeTestResources
packageX86FreeTest
prepareX86FreeDebugDependencies
prepareX86FreeTestDependencies
processX86FreeDebugManifest
processX86FreeDebugResources
processX86FreeTestJavaRes
processX86FreeTestResources
processX86FreeTestTestManifest
validateDebugSigning
installX86PaidDebug - Installs the Debug build for flavor X86Paid
compileX86PaidDebug
compileX86PaidDebugAidl
compileX86PaidDebugRenderscript
dexX86PaidDebug
generateX86PaidDebugBuildConfig
mergeX86PaidDebugAssets
mergeX86PaidDebugResources
packageX86PaidDebug
prepareX86PaidDebugDependencies
processX86PaidDebugJavaRes
processX86PaidDebugManifest
processX86PaidDebugResources
validateDebugSigning
installX86PaidTest - Installs the Test build for the X86PaidDebug build
compileX86PaidDebug
compileX86PaidDebugAidl
compileX86PaidDebugRenderscript
compileX86PaidTest
compileX86PaidTestAidl
compileX86PaidTestRenderscript
dexX86PaidTest
generateX86PaidDebugBuildConfig
generateX86PaidTestBuildConfig
mergeX86PaidDebugAssets
mergeX86PaidDebugResources
mergeX86PaidTestAssets
mergeX86PaidTestResources
packageX86PaidTest
prepareX86PaidDebugDependencies
prepareX86PaidTestDependencies
processX86PaidDebugManifest
processX86PaidDebugResources
processX86PaidTestJavaRes
processX86PaidTestResources
assembleArmFreeRelease
compileArmFreeRelease
compileArmFreeReleaseAidl
compileArmFreeReleaseRenderscript
dexArmFreeRelease
generateArmFreeReleaseBuildConfig
mergeArmFreeReleaseAssets
mergeArmFreeReleaseResources
packageArmFreeRelease
prepareArmFreeReleaseDependencies
processArmFreeReleaseJavaRes
processArmFreeReleaseManifest
processArmFreeReleaseResources
> 300 Tasks
A Rich Model
Demo
Deep IDE integration
http://gradlesummit.com
Gradle Summit 2015
June 11-12
Santa Clara, CA, USA
Build Logic
&
Imperativeness
<target name="main" depends="foo" >
<groovy>
@Grab('org.codehaus.groovy.modules:groovyws:0.5.1')
import groovyx.net.ws.WSClient
def url = 'http://www.w3schools.com/webservices/tempconvert.asmx?WSDL'
def proxy = new WSClient(url, this.class.classLoader)
proxy.initialize()
ant.echo "I'm freezing at ${properties.celsius} degrees"
properties.result = proxy.CelsiusToFahrenheit(properties.celsius)
</groovy>
<antcall target="results"/>
</target>
task generateMountainFiles << {
def outputDir = mkdir("$buildDir/mountains")
def mountains = new XmlSlurper().parse(file("src/mountains.xml"))
mountains.mountain.each { mountain ->
def mountainFile = new File(outputDir, mountain.name.text() + ".txt")
mountainFile.text = "feet:${mountain.height.text()}"
}
}
task generateMountainFiles(type: ConvertMountainXml) {
outputDir = "$buildDir/mountains" as File
xmlFile = file("src/mountains.xml")
separator = ":"
}
class ConvertMountainXml extends DefaultTask {
@InputFile
File xmlFile
@Input
String separator
@OutputDirectory
File outputDir
@TaskAction
public void generate() {
def mountains = new XmlSlurper().parse(xmlFile)
mountains.mountain.each { mountain ->
def mountainFile = new File(outputDir, mountain.name.text() + ".txt")
mountainFile.text = "feet$separator${mountain.height.text()}"
}
}
}
http://m.gradleware.com
http://gradleware.com/subscribe
http://www.gradle.org
http://gradleware.com/services
Hans Dockter
CEO, Gradleware
Founder Gradle
hans.dockter@gradleware.com
Questions?
Watch the video with slide synchronization on
InfoQ.com!
http://www.infoq.com/presentations/build-
system-concepts

More Related Content

More from C4Media

High Performing Teams Act Like Owners
High Performing Teams Act Like OwnersHigh Performing Teams Act Like Owners
High Performing Teams Act Like OwnersC4Media
 
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to JavaDoes Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to JavaC4Media
 
Service Meshes- The Ultimate Guide
Service Meshes- The Ultimate GuideService Meshes- The Ultimate Guide
Service Meshes- The Ultimate GuideC4Media
 
Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDC4Media
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine LearningC4Media
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at SpeedC4Media
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsC4Media
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsC4Media
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerC4Media
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleC4Media
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeC4Media
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereC4Media
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing ForC4Media
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data EngineeringC4Media
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreC4Media
 
Navigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsNavigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsC4Media
 
High Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechHigh Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechC4Media
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/awaitC4Media
 
Opportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaOpportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaC4Media
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayC4Media
 

More from C4Media (20)

High Performing Teams Act Like Owners
High Performing Teams Act Like OwnersHigh Performing Teams Act Like Owners
High Performing Teams Act Like Owners
 
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to JavaDoes Java Need Inline Types? What Project Valhalla Can Bring to Java
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
 
Service Meshes- The Ultimate Guide
Service Meshes- The Ultimate GuideService Meshes- The Ultimate Guide
Service Meshes- The Ultimate Guide
 
Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CD
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine Learning
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at Speed
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep Systems
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.js
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly Compiler
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix Scale
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's Edge
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing For
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data Engineering
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 
Navigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsNavigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery Teams
 
High Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechHigh Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in Adtech
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/await
 
Opportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaOpportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven Utopia
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
 

Recently uploaded

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...Martijn de Jong
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
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.pdfsudhanshuwaghmare1
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

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...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

The Art of the Builds

  • 1. Hans Dockter CEO, Gradleware Founder Gradle hans.dockter@gradleware.com The Art Of Builds
  • 2. InfoQ.com: News & Community Site • 750,000 unique visitors/month • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • News 15-20 / week • Articles 3-4 / week • Presentations (videos) 12-15 / week • Interviews 2-3 / week • Books 1 / month Watch the video with slide synchronization on InfoQ.com! http://www.infoq.com/presentations /build-system-concepts
  • 3. Purpose of QCon - to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide Presented at QCon San Francisco www.qconsf.com
  • 4.
  • 6.
  • 7. <target name="jar" depends="foo"> <mkdir dir="build/jar"/> <jar destfile="build/HelloWorld.jar" basedir="build/classes"> <manifest> <attribute name="Main-Class" value="oata.HelloWorld"/> </manifest> </jar> </target> task myDist(type: Jar) { from jar, "readme.txt", "distributionDir" } assemble.dependsOn myDist // This wiring could be done automatically
  • 8.
  • 9. <project> [...] <build> [...] <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.4</version> <configuration> <descriptors> //even more lines of code in the assemble descriptor <descriptor>src/main/assembly/src.xml</descriptor> </descriptors> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> [...] </project>
  • 10.
  • 11.
  • 12. Integration Tests (5 mins) Jar Documentation (5 mins) Distribution Generate License Key (1 sec)
  • 13. <target name="dist" depends=“integrationTests, docs, jar, key”> ... </target> <target name="distDE" depends=“integrationTests, docs, jar, key”> ... </target> docs.shouldRunAfter integrationTests
  • 17. <target name="integrationTestAll" depends=“startServer, integrationTests, stopServer”> ... </target> integrationTests.finalizedBy stopServer
  • 25.
  • 27. sourceSets { integTest { java.srcDir file('src/integration-test/java') resources.srcDir file('src/integration-test/resources') compileClasspath = sourceSets.main.output + configurations.integTest runtimeClasspath = output + compileClasspath } }
  • 28. // integration test plugin configurations { integTest.extendsFrom testRuntime } sourceSets { integTest { java.srcDir file('src/integration-test/java') resources.srcDir file('src/integration-test/resources') compileClasspath = sourceSets.main.output + configurations.integTest runtimeClasspath = output + compileClasspath } } task integrationTest(type: Test) { group = 'verify' testClassesDir = sourceSets.integTest.output.classesDir classpath = sourceSets.integTest.runtimeClasspath } check.dependsOn integrationTest apply plugin: 'java' apply plugin: 'integration-test' dependencies { [...] integTest "xmlunit:xmlunit:3.0" }
  • 29. apply plugin: 'java' apply plugin: 'integration-test' dependencies { [...] integTest "xmlunit:xmlunit:3.0" }
  • 30. apply plugin: 'java' apply plugin: 'integration-test' integrationTests { db { maxParallelForks = 1 } ui { maxParallelForks = 4 } } // integration test plugin // define integrationTests declarative element … ...
  • 31. apply plugin: 'android' android { compileSdkVersion 15 flavorGroups "abi", "version" productFlavors { arm { flavorGroup "abi" } x86 { flavorGroup "abi" } free { flavorGroup "version" packageName = "com.android.tests.flavored.free" versionName = "2.0.0-free" } paid { flavorGroup "version" packageName = "com.android.tests.flavored.paid" versionName = "1.0.0-paid" } } }
  • 32. Android tasks ------------- androidDependencies - Displays the Android dependencies of the project signingReport - Displays the signing info for each variant Build tasks ----------- assemble - Assembles all variants of all applications and secondary packages. [assembleArmFree, assembleArmPaid, assembleDebug, assembleRelease, assembleX86Free, assembleX86Paid] assembleArmFree - Assembles all builds for flavor ArmFree [assembleArmFreeDebug, assembleArmFreeRelease] assembleArmFreeDebug - Assembles the Debug build for flavor ArmFree compileArmFreeDebug compileArmFreeDebugAidl compileArmFreeDebugRenderscript dexArmFreeDebug generateArmFreeDebugBuildConfig mergeArmFreeDebugAssets mergeArmFreeDebugResources packageArmFreeDebug prepareArmFreeDebugDependencies processArmFreeDebugJavaRes processArmFreeDebugManifest processArmFreeDebugResources validateDebugSigning assembleArmFreeRelease - Assembles the Release build for flavor ArmFree compileArmFreeRelease compileArmFreeReleaseAidl compileArmFreeReleaseRenderscript dexArmFreeRelease generateArmFreeReleaseBuildConfig mergeArmFreeReleaseAssets mergeArmFreeReleaseResources packageArmFreeRelease prepareArmFreeReleaseDependencies processArmFreeReleaseJavaRes processArmFreeReleaseManifest processArmFreeReleaseResources assembleArmFreeTest - Assembles the Test build for the ArmFreeDebug build compileArmFreeDebug compileArmFreeDebugAidl compileArmFreeDebugRenderscript compileArmFreeTest compileArmFreeTestAidl compileArmFreeTestRenderscript dexArmFreeTest generateArmFreeDebugBuildConfig generateArmFreeTestBuildConfig mergeArmFreeDebugAssets mergeArmFreeDebugResources mergeArmFreeTestAssets mergeArmFreeTestResources packageArmFreeTest prepareArmFreeDebugDependencies prepareArmFreeTestDependencies processArmFreeDebugManifest processArmFreeDebugResources processArmFreeTestJavaRes processArmFreeTestResources processArmFreeTestTestManifest validateDebugSigning assembleArmPaid - Assembles all builds for flavor ArmPaid [assembleArmPaidDebug, assembleArmPaidRelease] assembleArmPaidDebug - Assembles the Debug build for flavor ArmPaid compileArmPaidDebug compileArmPaidDebugAidl compileArmPaidDebugRenderscript dexArmPaidDebug generateArmPaidDebugBuildConfig mergeArmPaidDebugAssets mergeArmPaidDebugResources packageArmPaidDebug prepareArmPaidDebugDependencies processArmPaidDebugJavaRes processArmPaidDebugManifest processArmPaidDebugResources validateDebugSigning assembleArmPaidRelease - Assembles the Release build for flavor ArmPaid compileArmPaidRelease compileArmPaidReleaseAidl compileArmPaidReleaseRenderscript dexArmPaidRelease generateArmPaidReleaseBuildConfig mergeArmPaidReleaseAssets mergeArmPaidReleaseResources packageArmPaidRelease prepareArmPaidReleaseDependencies processArmPaidReleaseJavaRes processArmPaidReleaseManifest processArmPaidReleaseResources assembleArmPaidTest - Assembles the Test build for the ArmPaidDebug build compileArmPaidDebug compileArmPaidDebugAidl compileArmPaidDebugRenderscript compileArmPaidTest compileArmPaidTestAidl compileArmPaidTestRenderscript dexArmPaidTest generateArmPaidDebugBuildConfig generateArmPaidTestBuildConfig mergeArmPaidDebugAssets mergeArmPaidDebugResources mergeArmPaidTestAssets mergeArmPaidTestResources packageArmPaidTest prepareArmPaidDebugDependencies prepareArmPaidTestDependencies processArmPaidDebugManifest processArmPaidDebugResources processArmPaidTestJavaRes processArmPaidTestResources processArmPaidTestTestManifest validateDebugSigning assembleDebug - Assembles all Debug builds [assembleArmFreeDebug, assembleArmPaidDebug, assembleX86FreeDebug, assembleX86PaidDebug] assembleRelease - Assembles all Release builds [assembleArmFreeRelease, assembleArmPaidRelease, assembleX86FreeRelease, assembleX86PaidRelease] assembleTest - Assembles all the Test applications [assembleArmFreeTest, assembleArmPaidTest, assembleX86FreeTest, assembleX86PaidTest] assembleX86Free - Assembles all builds for flavor X86Free [assembleX86FreeDebug, assembleX86FreeRelease] assembleX86FreeDebug - Assembles the Debug build for flavor X86Free compileX86FreeDebug compileX86FreeDebugAidl compileX86FreeDebugRenderscript dexX86FreeDebug generateX86FreeDebugBuildConfig mergeX86FreeDebugAssets mergeX86FreeDebugResources packageX86FreeDebug prepareX86FreeDebugDependencies processX86FreeDebugJavaRes processX86FreeDebugManifest processX86FreeDebugResources validateDebugSigning assembleX86FreeRelease - Assembles the Release build for flavor X86Free compileX86FreeRelease compileX86FreeReleaseAidl compileX86FreeReleaseRenderscript dexX86FreeRelease generateX86FreeReleaseBuildConfig mergeX86FreeReleaseAssets mergeX86FreeReleaseResources packageX86FreeRelease prepareX86FreeReleaseDependencies processX86FreeReleaseJavaRes processX86FreeReleaseManifest processX86FreeReleaseResources assembleX86FreeTest - Assembles the Test build for the X86FreeDebug build compileX86FreeDebug compileX86FreeDebugAidl compileX86FreeDebugRenderscript compileX86FreeTest compileX86FreeTestAidl compileX86FreeTestRenderscript dexX86FreeTest generateX86FreeDebugBuildConfig generateX86FreeTestBuildConfig mergeX86FreeDebugAssets mergeX86FreeDebugResources mergeX86FreeTestAssets mergeX86FreeTestResources packageX86FreeTest prepareX86FreeDebugDependencies prepareX86FreeTestDependencies processX86FreeDebugManifest processX86FreeDebugResources processX86FreeTestJavaRes processX86FreeTestResources processX86FreeTestTestManifest validateDebugSigning assembleX86Paid - Assembles all builds for flavor X86Paid [assembleX86PaidDebug, assembleX86PaidRelease] assembleX86PaidDebug - Assembles the Debug build for flavor X86Paid compileX86PaidDebug compileX86PaidDebugAidl compileX86PaidDebugRenderscript dexX86PaidDebug generateX86PaidDebugBuildConfig mergeX86PaidDebugAssets mergeX86PaidDebugResources packageX86PaidDebug prepareX86PaidDebugDependencies processX86PaidDebugJavaRes processX86PaidDebugManifest processX86PaidDebugResources validateDebugSigning assembleX86PaidRelease - Assembles the Release build for flavor X86Paid compileX86PaidRelease compileX86PaidReleaseAidl compileX86PaidReleaseRenderscript dexX86PaidRelease generateX86PaidReleaseBuildConfig mergeX86PaidReleaseAssets mergeX86PaidReleaseResources packageX86PaidRelease prepareX86PaidReleaseDependencies processX86PaidReleaseJavaRes processX86PaidReleaseManifest processX86PaidReleaseResources assembleX86PaidTest - Assembles the Test build for the X86PaidDebug build compileX86PaidDebug compileX86PaidDebugAidl compileX86PaidDebugRenderscript compileX86PaidTest compileX86PaidTestAidl compileX86PaidTestRenderscript dexX86PaidTest generateX86PaidDebugBuildConfig generateX86PaidTestBuildConfig mergeX86PaidDebugAssets mergeX86PaidDebugResources mergeX86PaidTestAssets mergeX86PaidTestResources packageX86PaidTest prepareX86PaidDebugDependencies prepareX86PaidTestDependencies processX86PaidDebugManifest processX86PaidDebugResources processX86PaidTestJavaRes processX86PaidTestResources processX86PaidTestTestManifest validateDebugSigning build - Assembles and tests this project. [assemble, check] buildDependents - Assembles and tests this project and all projects that depend on it. [build] buildNeeded - Assembles and tests this project and all projects it depends on. [build] clean - Deletes the build directory. Help tasks ---------- dependencies - Displays all dependencies declared in root project 'flavors'. dependencyInsight - Displays the insight into a specific dependency in root project 'flavors'. help - Displays a help message projects - Displays the sub-projects of root project 'flavors'. properties - Displays the properties of root project 'flavors'. tasks - Displays the tasks runnable from root project 'flavors' (some of the displayed tasks may belong to subprojects). Install tasks ------------- installArmFreeDebug - Installs the Debug build for flavor ArmFree compileArmFreeDebug compileArmFreeDebugAidl compileArmFreeDebugRenderscript dexArmFreeDebug generateArmFreeDebugBuildConfig mergeArmFreeDebugAssets mergeArmFreeDebugResources packageArmFreeDebug prepareArmFreeDebugDependencies processArmFreeDebugJavaRes processArmFreeDebugManifest processArmFreeDebugResources validateDebugSigning installArmFreeTest - Installs the Test build for the ArmFreeDebug build compileArmFreeDebug compileArmFreeDebugAidl compileArmFreeDebugRenderscript compileArmFreeTest compileArmFreeTestAidl compileArmFreeTestRenderscript dexArmFreeTest generateArmFreeDebugBuildConfig generateArmFreeTestBuildConfig mergeArmFreeDebugAssets mergeArmFreeDebugResources mergeArmFreeTestAssets mergeArmFreeTestResources packageArmFreeTest prepareArmFreeDebugDependencies prepareArmFreeTestDependencies processArmFreeDebugManifest processArmFreeDebugResources processArmFreeTestJavaRes processArmFreeTestResources processArmFreeTestTestManifest validateDebugSigning installArmPaidDebug - Installs the Debug build for flavor ArmPaid compileArmPaidDebug compileArmPaidDebugAidl compileArmPaidDebugRenderscript dexArmPaidDebug generateArmPaidDebugBuildConfig mergeArmPaidDebugAssets mergeArmPaidDebugResources packageArmPaidDebug prepareArmPaidDebugDependencies processArmPaidDebugJavaRes processArmPaidDebugManifest processArmPaidDebugResources validateDebugSigning installArmPaidTest - Installs the Test build for the ArmPaidDebug build compileArmPaidDebug compileArmPaidDebugAidl compileArmPaidDebugRenderscript compileArmPaidTest compileArmPaidTestAidl compileArmPaidTestRenderscript dexArmPaidTest generateArmPaidDebugBuildConfig generateArmPaidTestBuildConfig mergeArmPaidDebugAssets mergeArmPaidDebugResources mergeArmPaidTestAssets mergeArmPaidTestResources packageArmPaidTest prepareArmPaidDebugDependencies prepareArmPaidTestDependencies processArmPaidDebugManifest processArmPaidDebugResources processArmPaidTestJavaRes processArmPaidTestResources processArmPaidTestTestManifest validateDebugSigning installX86FreeDebug - Installs the Debug build for flavor X86Free compileX86FreeDebug compileX86FreeDebugAidl compileX86FreeDebugRenderscript dexX86FreeDebug generateX86FreeDebugBuildConfig mergeX86FreeDebugAssets mergeX86FreeDebugResources packageX86FreeDebug prepareX86FreeDebugDependencies processX86FreeDebugJavaRes processX86FreeDebugManifest processX86FreeDebugResources validateDebugSigning installX86FreeTest - Installs the Test build for the X86FreeDebug build compileX86FreeDebug compileX86FreeDebugAidl compileX86FreeDebugRenderscript compileX86FreeTest compileX86FreeTestAidl compileX86FreeTestRenderscript dexX86FreeTest generateX86FreeDebugBuildConfig generateX86FreeTestBuildConfig mergeX86FreeDebugAssets mergeX86FreeDebugResources mergeX86FreeTestAssets mergeX86FreeTestResources packageX86FreeTest prepareX86FreeDebugDependencies prepareX86FreeTestDependencies processX86FreeDebugManifest processX86FreeDebugResources processX86FreeTestJavaRes processX86FreeTestResources processX86FreeTestTestManifest validateDebugSigning installX86PaidDebug - Installs the Debug build for flavor X86Paid compileX86PaidDebug compileX86PaidDebugAidl compileX86PaidDebugRenderscript dexX86PaidDebug generateX86PaidDebugBuildConfig mergeX86PaidDebugAssets mergeX86PaidDebugResources packageX86PaidDebug prepareX86PaidDebugDependencies processX86PaidDebugJavaRes processX86PaidDebugManifest processX86PaidDebugResources validateDebugSigning installX86PaidTest - Installs the Test build for the X86PaidDebug build compileX86PaidDebug compileX86PaidDebugAidl compileX86PaidDebugRenderscript compileX86PaidTest compileX86PaidTestAidl compileX86PaidTestRenderscript dexX86PaidTest generateX86PaidDebugBuildConfig generateX86PaidTestBuildConfig mergeX86PaidDebugAssets mergeX86PaidDebugResources mergeX86PaidTestAssets mergeX86PaidTestResources packageX86PaidTest prepareX86PaidDebugDependencies prepareX86PaidTestDependencies processX86PaidDebugManifest processX86PaidDebugResources processX86PaidTestJavaRes processX86PaidTestResources assembleArmFreeRelease compileArmFreeRelease compileArmFreeReleaseAidl compileArmFreeReleaseRenderscript dexArmFreeRelease generateArmFreeReleaseBuildConfig mergeArmFreeReleaseAssets mergeArmFreeReleaseResources packageArmFreeRelease prepareArmFreeReleaseDependencies processArmFreeReleaseJavaRes processArmFreeReleaseManifest processArmFreeReleaseResources > 300 Tasks
  • 37. <target name="main" depends="foo" > <groovy> @Grab('org.codehaus.groovy.modules:groovyws:0.5.1') import groovyx.net.ws.WSClient def url = 'http://www.w3schools.com/webservices/tempconvert.asmx?WSDL' def proxy = new WSClient(url, this.class.classLoader) proxy.initialize() ant.echo "I'm freezing at ${properties.celsius} degrees" properties.result = proxy.CelsiusToFahrenheit(properties.celsius) </groovy> <antcall target="results"/> </target> task generateMountainFiles << { def outputDir = mkdir("$buildDir/mountains") def mountains = new XmlSlurper().parse(file("src/mountains.xml")) mountains.mountain.each { mountain -> def mountainFile = new File(outputDir, mountain.name.text() + ".txt") mountainFile.text = "feet:${mountain.height.text()}" } }
  • 38. task generateMountainFiles(type: ConvertMountainXml) { outputDir = "$buildDir/mountains" as File xmlFile = file("src/mountains.xml") separator = ":" } class ConvertMountainXml extends DefaultTask { @InputFile File xmlFile @Input String separator @OutputDirectory File outputDir @TaskAction public void generate() { def mountains = new XmlSlurper().parse(xmlFile) mountains.mountain.each { mountain -> def mountainFile = new File(outputDir, mountain.name.text() + ".txt") mountainFile.text = "feet$separator${mountain.height.text()}" } } }
  • 41. Hans Dockter CEO, Gradleware Founder Gradle hans.dockter@gradleware.com Questions?
  • 42. Watch the video with slide synchronization on InfoQ.com! http://www.infoq.com/presentations/build- system-concepts