What is Gradle? S Gradle is a task based build system. From files and configuration it assembles build artifacts. S Gradle is flexible. It is not bound to any specific process or technology. S Gradle uses a Groovy based DSL to write configuration. This makes it easy to read and write Gradle scripts.
The Gradle manifesto S „Build scripts are code.“ S Don‘t expect, allow. S Don‘t re-invent, re-use. S Don‘t inherit, inject. S Scale to the complexity of a problem. – „Make the impossible possible, the possible easy, and the easy elegant.“
Gradle vs. Maven <build> <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <phase>install</phase> <goals> <goal>run</goal> </goals> <configuration> <tasks> <echo message="what’s with the bloat?" /> </tasks> </configuration> </execution> </executions> </plugin> </plugins> </build>
Gradle vs. Maven (cont.)
println "dunno, must be a Maven thing."
Gradle vs. Maven (cont.) S Maven is declarative. Gradle is imperative. S Maven is verbose. Gradle is concise. S Maven assumes Maven. Gradle doesn‘t. S Maven scales poorly to simple problems. Gradle scales with the complexity of a problem.
Gradle vs. Maven (cont.) S Maven has a rich plug-in ecosystem. Gradle still needs to catch-up here. S Maven has very good IDE support. Gradle has... IDE support. S Maven has project archetypes. Gradle doesn‘t.
How is Gradle used? $ls build/ build.gradle ... ... $gradle tasks $gradle clean build $gradle androidInstall androidInstrument