We present three scenarios by giving presenting a context, a stimulus and Gradle's expected behavior. Readers will be convinced after reading our AD that Gradle exhibits the correct system response in these three scenarios. We will reference these scenarios throughout our AD.
A member of a software development team wants to build the software following a series of changes to the source code, the changes to the source code do not require Gradle to be reconfigured.
Gradle is already configured to be build the software via the settings script file and project script files.
A Gradle daemon is available to run the build.
The developer runs a Gradle build task via the command line interface. (gradle build
).
Gradle does not use the build cache, it recompiles all the software's source code dictated by Gradle's configuration. It uses the existing Gradle daemon to run the build, thus improving performance.
A developer modified Gradle's configuration such that it applies a plugin on a particular project.
The plugin is not present locally and must be downloaded/fetched. The project's configuration script file is configured to include the plugin and includes the plugin's source repository.
The source repository is available (e.g. if the source repository is a website, then the website is not down).
The developer runs a build task which is configured to build the aforementioned project.
Gradle fetches the plugin from the source and applies to the project during the build's configuration phase.
A developer runs a build on a project. Gradle does not need to recompile every single source file, if a source file was not changed, Gradle does not need to recompile it.
The project was previously built, and the source code files did not change.
N/A
The developer runs a build which includes the compilation of the aforementioned project.
Gradle only runs the compilation related tasks whose input did not change, therefore if a compilation task takes source code as input, then the source code will be recompiled if and only if it did not change.