Group log messages generated when provisioning Gradle

This commit is contained in:
Daz DeBoer 2021-09-13 11:47:32 -06:00
parent 3390540145
commit 4264cda558
No known key found for this signature in database
GPG key ID: DD6B9F0B06683D5D

View file

@ -93,6 +93,14 @@ async function findGradleVersionDeclaration(
async function provisionGradle( async function provisionGradle(
versionInfo: GradleVersionInfo versionInfo: GradleVersionInfo
): Promise<string> {
return core.group(`Provision Gradle ${versionInfo.version}`, async () => {
return locateGradleAndDownloadIfRequired(versionInfo)
})
}
async function locateGradleAndDownloadIfRequired(
versionInfo: GradleVersionInfo
): Promise<string> { ): Promise<string> {
const installsDir = path.join(os.homedir(), 'gradle-installations/installs') const installsDir = path.join(os.homedir(), 'gradle-installations/installs')
const installDir = path.join(installsDir, `gradle-${versionInfo.version}`) const installDir = path.join(installsDir, `gradle-${versionInfo.version}`)