mirror of
				https://github.com/gradle/gradle-build-action.git
				synced 2025-11-04 09:58:56 +08:00 
			
		
		
		
	Update for Gradle 8.1 release
With Gradle 8.1, the configuration-cache has changed and is now stable. As a temporary measure, this commit disables save/restore of the configuration-cache data to avoid issues until we can deal with this change properly.
This commit is contained in:
		@@ -4,7 +4,7 @@ import path from 'path'
 | 
			
		||||
import fs from 'fs'
 | 
			
		||||
import {CacheListener} from './cache-reporting'
 | 
			
		||||
import {saveCache, restoreCache, cacheDebug, isCacheDebuggingEnabled, tryDelete, generateCacheKey} from './cache-utils'
 | 
			
		||||
import {ConfigurationCacheEntryExtractor, GradleHomeEntryExtractor} from './cache-extract-entries'
 | 
			
		||||
import {GradleHomeEntryExtractor} from './cache-extract-entries'
 | 
			
		||||
 | 
			
		||||
const RESTORED_CACHE_KEY_KEY = 'restored-cache-key'
 | 
			
		||||
 | 
			
		||||
@@ -80,7 +80,7 @@ export class GradleStateCache {
 | 
			
		||||
    async afterRestore(listener: CacheListener): Promise<void> {
 | 
			
		||||
        await this.debugReportGradleUserHomeSize('as restored from cache')
 | 
			
		||||
        await new GradleHomeEntryExtractor(this.gradleUserHome).restore(listener)
 | 
			
		||||
        await new ConfigurationCacheEntryExtractor(this.gradleUserHome).restore(listener)
 | 
			
		||||
        // await new ConfigurationCacheEntryExtractor(this.gradleUserHome).restore(listener)
 | 
			
		||||
        await this.debugReportGradleUserHomeSize('after restoring common artifacts')
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -130,8 +130,8 @@ export class GradleStateCache {
 | 
			
		||||
        await this.debugReportGradleUserHomeSize('before saving common artifacts')
 | 
			
		||||
        this.deleteExcludedPaths()
 | 
			
		||||
        await Promise.all([
 | 
			
		||||
            new GradleHomeEntryExtractor(this.gradleUserHome).extract(listener),
 | 
			
		||||
            new ConfigurationCacheEntryExtractor(this.gradleUserHome).extract(listener)
 | 
			
		||||
            new GradleHomeEntryExtractor(this.gradleUserHome).extract(listener)
 | 
			
		||||
            // new ConfigurationCacheEntryExtractor(this.gradleUserHome).extract(listener)
 | 
			
		||||
        ])
 | 
			
		||||
        await this.debugReportGradleUserHomeSize(
 | 
			
		||||
            "after extracting common artifacts (only 'caches' and 'notifications' will be stored)"
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@ import * as fs from 'fs'
 | 
			
		||||
 | 
			
		||||
import {CacheEntryListener} from './cache-reporting'
 | 
			
		||||
 | 
			
		||||
const CACHE_PROTOCOL_VERSION = 'v6-'
 | 
			
		||||
const CACHE_PROTOCOL_VERSION = 'v7-'
 | 
			
		||||
 | 
			
		||||
const JOB_CONTEXT_PARAMETER = 'workflow-job-context'
 | 
			
		||||
const CACHE_DISABLED_PARAMETER = 'cache-disabled'
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user