diff --git a/src/caches.ts b/src/caches.ts index 714ef2c..562bc55 100644 --- a/src/caches.ts +++ b/src/caches.ts @@ -11,11 +11,13 @@ export async function restore(buildRootDirectory: string): Promise { return } - core.startGroup('Restore Gradle state from cache') - core.saveState(BUILD_ROOT_DIR, buildRootDirectory) - new GradleUserHomeCache().restore() - new ProjectDotGradleCache(buildRootDirectory).restore() - core.endGroup() + await core.group('Restore Gradle state from cache', async () => { + core.saveState(BUILD_ROOT_DIR, buildRootDirectory) + return Promise.all([ + new GradleUserHomeCache().restore(), + new ProjectDotGradleCache(buildRootDirectory).restore() + ]) + }) } export async function save(): Promise { @@ -24,9 +26,11 @@ export async function save(): Promise { return } - core.startGroup('Caching Gradle state') - const buildRootDirectory = core.getState(BUILD_ROOT_DIR) - new GradleUserHomeCache().save() - new ProjectDotGradleCache(buildRootDirectory).save() - core.endGroup() + await core.group('Caching Gradle state', async () => { + const buildRootDirectory = core.getState(BUILD_ROOT_DIR) + return Promise.all([ + new GradleUserHomeCache().save(), + new ProjectDotGradleCache(buildRootDirectory).save() + ]) + }) }