mirror of
https://gitea.com/actions/setup-java.git
synced 2025-04-05 23:09:37 +00:00
feat: support Gradle version catalog (#394)
This commit is contained in:
@ -98,7 +98,7 @@ describe('dependency cache', () => {
|
||||
await expect(restore('gradle')).rejects.toThrowError(
|
||||
`No file in ${projectRoot(
|
||||
workspace
|
||||
)} matched to [**/*.gradle*,**/gradle-wrapper.properties,buildSrc/**/Versions.kt,buildSrc/**/Dependencies.kt], make sure you have checked out the target repository`
|
||||
)} matched to [**/*.gradle*,**/gradle-wrapper.properties,buildSrc/**/Versions.kt,buildSrc/**/Dependencies.kt,gradle/*.versions.toml], make sure you have checked out the target repository`
|
||||
);
|
||||
});
|
||||
it('downloads cache based on build.gradle', async () => {
|
||||
@ -112,6 +112,15 @@ describe('dependency cache', () => {
|
||||
it('downloads cache based on build.gradle.kts', async () => {
|
||||
createFile(join(workspace, 'build.gradle.kts'));
|
||||
|
||||
await restore('gradle');
|
||||
expect(spyCacheRestore).toBeCalled();
|
||||
expect(spyWarning).not.toBeCalled();
|
||||
expect(spyInfo).toBeCalledWith('gradle cache is not found');
|
||||
});
|
||||
it('downloads cache based on libs.versions.toml', async () => {
|
||||
createDirectory(join(workspace, 'gradle'));
|
||||
createFile(join(workspace, 'gradle', 'libs.versions.toml'));
|
||||
|
||||
await restore('gradle');
|
||||
expect(spyCacheRestore).toBeCalled();
|
||||
expect(spyWarning).not.toBeCalled();
|
||||
|
Reference in New Issue
Block a user