

If a remote dependency is declared in a Gradle build file using Maven syntax then the dependency will be downloaded automatically from the designated repository and included in the build process. Remote dependencies are handled for Android Studio projects using another project management tool named Maven. A remote dependency refers to an item that is present on a remote server (typically referred to as a repository).



A local dependency references an item that is present on the local file system of the computer system on which the build is being performed. Gradle dependencies can be categorized as local or remote. Other examples of dependencies are libraries and JAR files on which the project depends in order to compile and run. This dependency can be declared in the Gradle build file for the first module so that the second module is included in the application build, or an error flagged in the event the second module cannot be found or built. The first module has, in effect, a dependency on the second module since the application will fail to build if the second module cannot be located and launched at runtime. Consider, for example, a module within an Android Studio project which triggers an intent to load another module in the project. The configuration rules to build a project are declared in Gradle build files and scripts based on the Groovy programming language.Īnother key area of Gradle functionality is that of dependencies. In the case of Android Studio, Gradle integration is provided through the appropriately named Android Studio Plug-in.Īlthough the Android Studio Plug-in allows Gradle tasks to be initiated and managed from within Android Studio, the Gradle command-line wrapper can still be used to build Android Studio based projects, including on systems on which Android Studio is not installed. The Gradle system is a self-contained, command-line based environment that can be integrated into other environments through the use of plug-ins. The strength of Gradle lies in the flexibility that it provides to the developer. This includes defining how a project is to be built, what dependencies need to be fulfilled for the project to build successfully and what the end result (or results) of the build process should be. Gradle is an automated build toolkit that allows the way in which projects are built to be configured and managed through a set of build configuration files.
