Gradle Build Cache is a TeamCity plugin that provides a build feature to enable the Gradle Build Cache. The plugin applies the Gradle Hazelcast settings plugin to enable build caching and starts a Hazelcast node on the TeamCity Server.
-
Configures the TeamCity Server to run as a Build Cache host using Hazelcast
-
Enables the Gradle Build Cache on a build configuration by adding a Build Feature
-
Collects Gradle task outcomes and provides a graph on the statistics page
-
Download the plugin file from https://plugins.jetbrains.com/plugin/9680-gradle-build-cache (see Downloads section at the bottom of the page).
-
Go to the plugin list of your TeamCity installation at
<TeamCity URL>/admin/admin.html?item=plugins
and click on the link Upload plugin zip to install the downloaded plugin file. -
Restart TeamCity.
-
Edit a build configuration and add the Build Feature, Gradle Build Cache.
-
Run a build that uses Gradle 3.5 or later.
The plugin applies version 0.9 of the Gradle Hazelcast plugin when Gradle 3.5 is used
and applies version 0.11 when Gradle 4.0 milestone 2 and later are used.
The version of the plugin can be overridden by setting the Java system property teamcity.build.cache.plugin.version
with the version to use.
If successful the build log should contain lines similar to the following:
[12:51:42][Step 1/1] Starting Gradle in TeamCity build 6 [12:51:43][Step 1/1] Build cache is an incubating feature. [12:51:44][Step 1/1] Using Hazelcast node 'gradle-task-cache' at teamcity.local:5701 as local build cache, push is enabled. ... task output not shown [12:51:46][Step 1/1] BUILD SUCCESSFUL [12:51:46][Step 1/1] [12:51:46][Step 1/1] Total time: 6.012 secs [12:51:46][Step 1/1] [12:51:46][Step 1/1] 53 tasks in build, out of which 20 (38%) were executed [12:51:46][Step 1/1] 5 (9%) skipped [12:51:46][Step 1/1] 11 (21%) up-to-date [12:51:46][Step 1/1] 10 (19%) no-source [12:51:46][Step 1/1] 7 (13%) loaded from cache [12:51:46][Step 1/1] 20 (38%) not cacheable [12:51:46][Step 1/1] Process exited with code 0
This plugin is available under the Apache License, Version 2.0.