Bitrise Gradle remote cache init script setup should be compatible with Gradle configuration cache

At the moment, the only reliable way to enable the Bitrise remote Gradle cache is using the predefined step.. If we dig under the hood, we see that this works by modifying the Gradle init script, via the bitrise-build-cache-cli.

In its current form, this breaks compatibility with Gradle configuration cache; configuration cache is never reusable over pipeline runs when the remote cache setup step is enabled. This is somewhat self-defeating for a cache feature; configuration caching can speed up builds almost as much as build caching, especially for large projects. (Some very smart folks suggest that we should strive to avoid using init scripts entirely - skip to 22:52 in the video.)

Ideally, users should be able to configure the Bitrise remote cache without using the init script mechanism. It’d be great if using the io.bitrise.gradle:remote-cache package and configuring via the BitriseBuildCache class in our own Gradle settings code was a supported and documented option.

Hi @garry.jeromson_migro :wave:

We’re working on improved support for configuring Bitrise Remote Build Cache for Gradle manually, so you can store the configs in your repo.

That said, that alone will not make the io.bitrise.gradle:remote-cache gradle plugin configuration cache compatible unfortunately. We plan to do that as well, but that requires a few changes in the plugin.

Howdy @viktorbenei, thanks for the quick reply!

That sounds promising - looking forward to any developments. :slight_smile: