A project represents a thing that is to be done, like deploying applications to staging environments. A Gradle project requires a set of tasks to execute.
A task refers to a piece of work performed by a build. It might be something as simple as compiling classes, creating JAR files, making Javadoc, or publishing some archives.
A build script is known as build.gradle and is located in the root directory of the project. Every Gradle build comprises one or more projects.
Gradle avoids unnecessary work by only running the tasks that need to run because their inputs or outputs have changed. You can also use a build cache to enable the reuse of task outputs from previous runs or even from a different machine (with a shared build cache).
There are many other optimizations that Gradle implements and the development team continually work to improve Gradle’s performance.
Gradle runs on the JVM and you must have a Java Development Kit (JDK) installed to use it. This is a bonus for users familiar with the Java platform as you can use the standard Java APIs in your build logic, such as custom task types and plugins. It also makes it easy to run Gradle on different platforms.
Note that Gradle isn’t limited to building just JVM projects, and it even comes packaged with support for building native projects.
Gradle takes a leaf out of Maven’s book and makes common types of projects —such as Java projects —easy to build by implementing conventions. Apply the appropriate plugins and you can easily end up with slim build scripts for many projects. But these conventions don’t limit you: Gradle allows you to override them, add your own tasks, and make many other customizations to your convention-based builds.
You can readily extend Gradle to provide your own task types or even build the model. See the Android build support for an example of this: it adds many new build concepts such as flavors and build types.
Several major IDEs allow you to import Gradle builds and interact with them: Android Studio, IntelliJ IDEA, Eclipse, and NetBeans. Gradle also has support for generating the solution files required to load a project into Visual Studio.
Build scansprovide extensive information about a build run that you can use to identify build issues. They are particularly good at helping you to identify problems with a build’s performance. You can also share build scans with others, which is particularly useful if you need to ask for advice in fixing an issue with the build.
Gradle avoids unnecessary work by only running the tasks that need to run because their inputs or outputs have changed. You can also use a build cache to enable the reuse of task outputs from previous runs or even from a different machine (with a shared build cache).
There are many other optimizations that Gradle implements and the development team continually work to improve Gradle’s performance.
Gradle runs on the JVM and you must have a Java Development Kit (JDK) installed to use it. This is a bonus for users familiar with the Java platform as you can use the standard Java APIs in your build logic, such as custom task types and plugins. It also makes it easy to run Gradle on different platforms.
Note that Gradle isn’t limited to building just JVM projects, and it even comes packaged with support for building native projects.
Gradle takes a leaf out of Maven’s book and makes common types of projects —such as Java projects —easy to build by implementing conventions. Apply the appropriate plugins and you can easily end up with slim build scripts for many projects. But these conventions don’t limit you: Gradle allows you to override them, add your own tasks, and make many other customizations to your convention-based builds.
You can readily extend Gradle to provide your own task types or even build the model. See the Android build support for an example of this: it adds many new build concepts such as flavors and build types.
Several major IDEs allow you to import Gradle builds and interact with them: Android Studio, IntelliJ IDEA, Eclipse, and NetBeans. Gradle also has support for generating the solution files required to load a project into Visual Studio.
Build scansprovide extensive information about a build run that you can use to identify build issues. They are particularly good at helping you to identify problems with a build’s performance. You can also share build scans with others, which is particularly useful if you need to ask for advice in fixing an issue with the build.
Confused about our certifications?
Let Our Advisor Guide You