Rename the 'wrapper-cache-enabled' flag to 'distributions-cache-enabled'

This commit is contained in:
Daz DeBoer 2021-07-05 17:47:14 -06:00
parent 4edc9657af
commit 241d9c1df0
No known key found for this signature in database
GPG key ID: 70F584A28F2230E8
6 changed files with 14 additions and 14 deletions

View file

@ -12,7 +12,7 @@ const WRAPPER_SLUG = 'WRAPPER_SLUG'
export async function restoreCachedWrapperDist(
gradlewDirectory: string | null
): Promise<void> {
if (isWrapperCacheDisabled()) return
if (isDistributionsCacheDisabled()) return
if (gradlewDirectory == null) return
const wrapperProperties = path.join(
@ -56,7 +56,7 @@ export async function restoreCachedWrapperDist(
}
export async function cacheWrapperDist(): Promise<void> {
if (isWrapperCacheDisabled()) return
if (isDistributionsCacheDisabled()) return
const wrapperSlug = core.getState(WRAPPER_SLUG)
if (!wrapperSlug) return
@ -106,8 +106,8 @@ export function extractGradleWrapperSlugFromDistUri(
return match ? match[1] : null
}
function isWrapperCacheDisabled(): boolean {
return !github.inputBoolean('wrapper-cache-enabled', true)
function isDistributionsCacheDisabled(): boolean {
return !github.inputBoolean('distributions-cache-enabled', true)
}
function getCacheKey(wrapperSlug: string): string {

View file

@ -111,7 +111,7 @@ async function downloadAndCacheGradleDistribution(
`gradle-installations/downloads/gradle-${versionInfo.version}-bin.zip`
)
if (isDistributionCacheDisabled()) {
if (isDistributionsCacheDisabled()) {
await downloadGradleDistribution(versionInfo, downloadPath)
return downloadPath
}
@ -173,8 +173,8 @@ async function httpGetString(url: string): Promise<string> {
return response.readBody()
}
function isDistributionCacheDisabled(): boolean {
return !github.inputBoolean('wrapper-cache-enabled', true)
function isDistributionsCacheDisabled(): boolean {
return !github.inputBoolean('distributions-cache-enabled', true)
}
interface GradleVersionInfo {