diff --git a/action.yml b/action.yml index c6af975..ec05f65 100644 --- a/action.yml +++ b/action.yml @@ -54,7 +54,7 @@ inputs: $GPG_PASSPHRASE.' required: false cache: - description: 'Name of the build platform to cache dependencies. It can be "maven" or "gradle".' + description: 'Name of the build platform to cache dependencies. It can be "maven", "gradle" or "sbt".' required: false job-status: description: 'Workaround to pass job status to post job step. This variable is not intended for manual setting' diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js index df214f9..4f4cada 100644 --- a/dist/cleanup/index.js +++ b/dist/cleanup/index.js @@ -66179,7 +66179,11 @@ const supportedPackageManager = [ path: [ path_1.join(os_1.default.homedir(), '.ivy2', 'cache'), path_1.join(os_1.default.homedir(), '.sbt'), - getCoursierCachePath() + getCoursierCachePath(), + // Some files should not be cached to avoid resolution problems. + // In particular the resolution of snapshots (ideological gap between maven/ivy). + '!' + path_1.join(os_1.default.homedir(), '.sbt', '*.lock'), + '!' + path_1.join(os_1.default.homedir(), '**', 'ivydata-*.properties') ], pattern: ['**/*.sbt', '**/project/build.properties', '**/project/**.{scala,sbt}'] } diff --git a/dist/setup/index.js b/dist/setup/index.js index 5f2dccb..5841835 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -101384,7 +101384,11 @@ const supportedPackageManager = [ path: [ path_1.join(os_1.default.homedir(), '.ivy2', 'cache'), path_1.join(os_1.default.homedir(), '.sbt'), - getCoursierCachePath() + getCoursierCachePath(), + // Some files should not be cached to avoid resolution problems. + // In particular the resolution of snapshots (ideological gap between maven/ivy). + '!' + path_1.join(os_1.default.homedir(), '.sbt', '*.lock'), + '!' + path_1.join(os_1.default.homedir(), '**', 'ivydata-*.properties') ], pattern: ['**/*.sbt', '**/project/build.properties', '**/project/**.{scala,sbt}'] } diff --git a/src/cache.ts b/src/cache.ts index 0ddc426..b8c87d8 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -38,7 +38,11 @@ const supportedPackageManager: PackageManager[] = [ path: [ join(os.homedir(), '.ivy2', 'cache'), join(os.homedir(), '.sbt'), - getCoursierCachePath() + getCoursierCachePath(), + // Some files should not be cached to avoid resolution problems. + // In particular the resolution of snapshots (ideological gap between maven/ivy). + '!' + join(os.homedir(), '.sbt', '*.lock'), + '!' + join(os.homedir(), '**', 'ivydata-*.properties') ], pattern: ['**/*.sbt', '**/project/build.properties', '**/project/**.{scala,sbt}'] }