in Groovy -> uses Gradle DSL (Domain Specific Language) > supports currently Java, Groovy, Scala > additional plugins for > runtime integration (OSGi, Jetty/war, ..) > software development (checkstyle, findbugs, sonar ..) > deep API to hook into every point of execution Specs
Projects > project is made up of one or more Tasks > Tasks are structured on a task graph (DAG: directed acyclic graph) > You can hook into every stage of execution via the TaskExecutionListener Build Script Basics
Configure environment: init.gradle, gradle.properties > check and execute the settings.gradle file (only for multi-project builds) > determine which projects are going to take part in the build > create a Project instance for each project
determine set of tasks which were created and configured during configuration phase > set is defined by the arguments passed to gradle/gradlew call > each task is executed
phase.' task configured { println 'This is also executed during the configuration phase.' } task test { doFirst { println 'This is executed first during the execution phase.' } doLast { println 'This is executed last during the execution phase.' } println 'This is executed during the configuration phase as well.' } build.gradle println 'This is executed during the initialization phase.' settings.gradle
the initialization phase. This is executed during the configuration phase. This is also executed during the configuration phase. This is executed during the configuration phase as well. :test This is executed first during the execution phase. This is executed last during the execution phase. BUILD SUCCESSFUL Total time: 1 secs Console
not change > outputs are still there and did not change > shown as UP-TO-DATE > change detection via > snapshot of input & output files > hash of contents of each file > snapshots persisted until next execution Incremental Builds
(avoid copy&paste) > Encapsulation (hide your implementation) > Modularity (clean, maintainable code) > Composition (plugins can complement each other) > typical use cases > extend basic Gradle model > add new tasks, extend specific model > configure your project Plugins