Files
actions/sources/vendor/gradle-actions-caching/index.d.ts
T
Daz DeBoerandClaude Opus 4.8 bc54cf57d1 Support repo-registration as a second enablement path for project-entry caching
Configuration-cache store/restore is now enabled when EITHER a valid Develocity
JWT OR per-repo registration (a GitHub App installation that accepted the T&C) is
present. The gate itself lives in the vendored gradle-actions-caching library
(refreshed to 0.9.1); this repo wires up the reporting and notice.

- ProjectCacheStatus: 'trial-not-licensed' -> 'not-registered'.
- caching-report: render the 'not-registered' line with a /register link, and add
  renderProjectCacheNotice() for a prominent core.notice.
- setup-gradle: emit the notice from complete() only when withheld via the
  registration path; quiet when enabled by either path.
- Refresh vendored gradle-actions-caching to 0.9.1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 16:01:43 -06:00

73 lines
2.3 KiB
TypeScript

/** @public */
export declare interface BuildResult {
get rootProjectName(): string;
get rootProjectDir(): string;
get requestedTasks(): string;
get gradleVersion(): string;
get gradleHomeDir(): string;
get buildFailed(): boolean;
get configCacheHit(): boolean;
get buildScanUri(): string;
get buildScanFailed(): boolean;
}
/** @public */
export declare type CacheCleanupStatus = 'enabled' | 'disabled-param' | 'disabled-failure' | 'disabled-config-cache-hit' | 'disabled-readonly';
/** @public */
export declare interface CacheEntryReport {
entryName: string;
requestedKey?: string;
restoredKey?: string;
restoredSize?: number;
restoredTime?: number;
restoredOutcome: string;
savedKey?: string;
savedSize?: number;
savedTime?: number;
savedOutcome: string;
}
/** @public */
export declare interface CacheOptions {
disabled: boolean;
readOnly: boolean;
writeOnly: boolean;
overwriteExisting: boolean;
strictMatch: boolean;
cleanup: 'always' | 'on-success' | 'never';
encryptionKey?: string;
develocityAccessToken?: string;
develocityServerUrl?: string;
includes: string[];
excludes: string[];
}
/** @public */
export declare interface CacheReport {
status: CacheStatus;
cleanup?: CacheCleanupStatus;
projectCache?: ProjectCacheStatus;
entries: CacheEntryReport[];
}
/** @public */
export declare type CacheStatus = 'enabled' | 'read-only' | 'write-only' | 'disabled' | 'disabled-existing-home' | 'not-available';
/**
* Status of project-entry caching (build-logic artifacts + configuration-cache data) for a run.
* Set as the gate is evaluated: opt-in, then trial expiry, then entitlement (Develocity trial
* license OR repo registration), then encryption key. Still beta.
*
* @public
*/
declare type ProjectCacheStatus = 'not-enabled' | 'trial-expired' | 'not-registered' | 'no-encryption-key' | 'enabled';
/** @public */
export declare function restore(gradleUserHome: string, cacheOptions: CacheOptions): Promise<void>;
/** @public */
export declare function save(gradleUserHome: string, buildResults: BuildResult[], cacheOptions: CacheOptions): Promise<CacheReport>;
export { }