BuildCacheConfiguration

整个 Gradle 构建的构建缓存配置。

属性

属性描述
local

本地目录缓存配置。

remote

远程缓存配置。

方法

方法描述
local(configuration)

针对本地配置执行给定操作。

remote(type)

配置具有给定类型的远程缓存。

remote(type, configuration)

配置具有给定类型的远程缓存。

remote(configuration)

针对当前配置的远程缓存执行给定操作。

脚本块

无脚本块

属性详情

DirectoryBuildCache local (read-only)

本地目录缓存配置。

BuildCache remote (read-only)

远程缓存配置。

方法详情

void local(Action<? super DirectoryBuildCache> configuration)

针对本地配置执行给定操作。

T remote(Class<T> type)

配置具有给定类型的远程缓存。

如果已配置了不同类型的远程构建缓存,则此方法将替换它。

默认情况下,远程构建缓存中的存储("push")是禁用的。

T remote(Class<T> type, Action<? super T> configuration)

配置具有给定类型的远程缓存。

如果已配置了不同类型的远程构建缓存,则此方法将替换它。

如果已配置了相同类型的远程构建缓存,则此方法将配置它。

默认情况下,远程构建缓存中的存储("push")是禁用的。

void remote(Action<? super BuildCache> configuration)

针对当前配置的远程缓存执行给定操作。