[Windows] Update Kotlin install (#4645)

This commit is contained in:
Nikolay Frolov
2021-12-08 10:39:42 +03:00
committed by GitHub
parent 7450e2dabe
commit 07a22999fe
6 changed files with 45 additions and 3 deletions

View File

@@ -4,9 +4,11 @@
################################################################################
# Install Kotlin
$url = "https://api.github.com/repos/JetBrains/kotlin/releases/latest"
[System.String] $kotlinLatest = (Invoke-RestMethod -Uri $url).assets.browser_download_url -match "kotlin-compiler"
$kotlinInstallerPath = Start-DownloadWithRetry -Url $kotlinLatest -Name "kotlin-compiler.zip"
$kotlinVersion = (Get-ToolsetContent).kotlin.version
$kotlinBinaryName = (Get-ToolsetContent).kotlin.binary_name
$kotlinDownloadUrl = Get-GitHubPackageDownloadUrl -RepoOwner "JetBrains" -RepoName "kotlin" -BinaryName $kotlinBinaryName -Version $kotlinVersion -UrlFilter "*{BinaryName}-{Version}.zip"
$kotlinInstallerPath = Start-DownloadWithRetry -Url $kotlinDownloadUrl -Name "$kotlinBinaryName.zip"
Write-Host "Expand Kotlin archive"
$kotlinPath = "C:\tools"