Add SBT in cache managers.

This commit is contained in:
Florian Meriaux 2022-03-24 10:11:05 +01:00 committed by GitHub
parent f69f00b5e5
commit 754319f3bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 7 deletions

View file

@ -13,7 +13,7 @@ const CACHE_MATCHED_KEY = 'cache-matched-key';
const CACHE_KEY_PREFIX = 'setup-java';
interface PackageManager {
id: 'maven' | 'gradle';
id: 'maven' | 'gradle' | 'sbt';
/**
* Paths of the file that specify the files to cache.
*/
@ -32,6 +32,12 @@ const supportedPackageManager: PackageManager[] = [
path: [join(os.homedir(), '.gradle', 'caches'), join(os.homedir(), '.gradle', 'wrapper')],
// https://github.com/actions/cache/blob/0638051e9af2c23d10bb70fa9beffcad6cff9ce3/examples.md#java---gradle
pattern: ['**/*.gradle*', '**/gradle-wrapper.properties']
},
{
id: 'sbt',
path: [join(os.homedir(), '.ivy2', 'cache'), join(os.homedir(), '.sbt')],
// https://github.com/actions/cache/blob/0638051e9af2c23d10bb70fa9beffcad6cff9ce3/examples.md#scala---sbt
pattern: ['**/build.sbt']
}
];