Generate your Gradle build scripts through a few simple settings in Artifactory. You can even generate dependency declarations automatically.
Artifactory provides a plugin for tight integration with Gradle. Through this plugin, Gradle can be configured to resolve artifacts through Artifactory by modifying properties in the build.gradle script file. And to make things really easy, Artifactory can even generate the corresponding script file directly from its UI.
Optimized builds through reduced networking
Running builds through Artifactory can reduce build times significantly by reducing networking. This is because Artifactory stores remote artifacts locally in remote repository caches, so once an artifact has been cached, it is locally available for builds without the need for any networking.
Integrating Gradle with Artifactory also makes builds more reliable, because any dependency on remote repositories, or the external network has been removed. Even if a remote repository goes down, or if there is an issue with the external network, the build will succeed since remote artifacts are available from the local cache.
Fully reproducible builds
But there is another big advantage of Artifactory’s integration with Gradle.
Artifactory generates exhaustive build information and uploads it to a local repository together with the build. This includes specific artifact versions, dependencies, system properties, environment variables, user information, timestamps and more. With this information, it is easy to faithfully reproduce a build at any time. Moreover, with built-in “Diff” tools you can compare builds and therefore know exactly what changes were introduced from one version to another. These capabilities can be invaluable when trying to track down bugs that were reported in specific versions released.