mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-07-17 12:45:48 +02:00
Rename the 'wrapper-cache-enabled' flag to 'distributions-cache-enabled'
This commit is contained in:
parent
4edc9657af
commit
241d9c1df0
6 changed files with 14 additions and 14 deletions
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue