Add legacy open-source caching module as default

Recover the pre-extraction caching code (from 7a4e0968~1) into a
standalone module at sources/legacy-caching/. This module bundles
@actions/cache@4.0.5 with the existing patch and adapts the old
caching API to the current CacheService interface.

The cache-service-loader now uses the legacy module by default and
only loads the proprietary vendored module when the license is
accepted. Both paths are wrapped in a LoggingCacheService that
identifies which module is active in logs and the Job Summary.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Daz DeBoer
2026-04-01 13:10:20 -06:00
parent b93d9dccdc
commit e48bd1161b
18 changed files with 4404 additions and 41 deletions
+23
View File
@@ -0,0 +1,23 @@
{
"name": "gradle-actions-legacy-caching",
"version": "1.0.0",
"private": true,
"type": "module",
"main": "./dist/index.js",
"scripts": {
"postinstall": "patch-package",
"build": "esbuild src/index.ts --bundle --platform=node --target=node24 --format=esm --banner:js=\"import {createRequire} from 'module';const require=createRequire(import.meta.url);\" --outfile=dist/index.js --sourcemap --minify"
},
"dependencies": {
"@actions/cache": "4.0.5",
"@actions/core": "3.0.0",
"@actions/exec": "3.0.0",
"@actions/github": "9.0.0",
"@actions/glob": "0.6.1",
"semver": "7.7.4"
},
"devDependencies": {
"esbuild": "0.27.4",
"patch-package": "8.0.0"
}
}