• In this tutorial, we will learn about Groovy and Gradle along with their use to create Gradle build tasks and build projects respectively.
  • For simple builds, the choice between Maven and Gradle is pretty much one of personal taste, or perhaps the taste of your CTO or technical manager.
  • Unlike Ant and Maven which use XML for scripting, Gradle uses Groovy, a Domain Specific Language that’s a subset of Java with plenty of syntactic sugar.
  • create a single Jar with all dependencies task fatJar(type: Jar) { manifest {. attributes 'Implementation-Title': 'Gradle Jar File Example'
  • In this Gradle Build Script tutorial you’ll learn the basic syntax in build.gradle files generated by Android Studio.
  • Downloading and Installing Gradle. Gradle runs on all major operating systems and requires a Java JDK version 7 or higher to run.
  • Gradle comes with various built-in plugins. A custom plugin can also be built in any JVM based language. A Gradle plugin is a group of tasks.
  • Today, Android is using Gradle to automate and manage build process and at the same time to define flexible custom build configurations.
  • It does not use the build cache; thus, its build time is slower than Gradle. Gradle is highly customizable; it provides a wide range of IDE support custom builds.
  • Gradle has developed an API to query the Gradle project artifacts like taskNames, dependencies, etc. It allows users to execute builds programatically.