[Ubuntu] Add kotlin (#3755)

This commit is contained in:
mikhailshaganov
2021-07-22 11:31:30 +03:00
committed by GitHub
parent 05781ccad0
commit 966395f4bd
6 changed files with 53 additions and 1 deletions

View File

@@ -124,6 +124,11 @@ function Get-SwiftVersion {
return "Swift $swiftVersion"
}
function Get-KotlinVersion {
$kotlinVersion = kotlin -version | Out-String | Take-OutputPart -Part 2
return "Kotlin $kotlinVersion"
}
function Get-JuliaVersion {
$juliaVersion = julia --version | Take-OutputPart -Part 2
return "Julia $juliaVersion"

View File

@@ -49,7 +49,8 @@ $runtimesList = @(
(Get-Python3Version),
(Get-RubyVersion),
(Get-SwiftVersion),
(Get-JuliaVersion)
(Get-JuliaVersion),
(Get-KotlinVersion)
)
if (Test-IsUbuntu20) {

View File

@@ -0,0 +1,18 @@
#!/bin/bash -e
################################################################################
## File: kotlin.sh
## Desc: Installs Kotlin
################################################################################
source $HELPER_SCRIPTS/install.sh
KOTLIN_ROOT="/usr/share"
URL=$(curl -s https://api.github.com/repos/JetBrains/kotlin/releases/latest | jq -r '.assets[].browser_download_url | select(contains("kotlin-compiler"))')
download_with_retries $URL "/tmp"
unzip -qq /tmp/kotlin-compiler*.zip -d $KOTLIN_ROOT
rm $KOTLIN_ROOT/kotlinc/bin/*.bat
ln -sf $KOTLIN_ROOT/kotlinc/bin/* /usr/bin
invoke_tests "Tools" "Kotlin"

View File

@@ -383,3 +383,29 @@ Describe "yq" {
"yq -V" | Should -ReturnZeroExitCode
}
}
Describe "Kotlin" {
It "kapt" {
"kapt -version"| Should -ReturnZeroExitCode
}
It "kotlin" {
"kotlin -version"| Should -ReturnZeroExitCode
}
It "kotlinc" {
"kotlinc -version"| Should -ReturnZeroExitCode
}
It "kotlinc-js" {
"kotlinc-js -version"| Should -ReturnZeroExitCode
}
It "kotlinc-jvm" {
"kotlinc-jvm -version"| Should -ReturnZeroExitCode
}
It "kotlin-dce-js" {
"kotlin-dce-js -version"| Should -ReturnZeroExitCode
}
}

View File

@@ -223,6 +223,7 @@
"{{template_dir}}/scripts/installers/mercurial.sh",
"{{template_dir}}/scripts/installers/miniconda.sh",
"{{template_dir}}/scripts/installers/mono.sh",
"{{template_dir}}/scripts/installers/kotlin.sh",
"{{template_dir}}/scripts/installers/mysql.sh",
"{{template_dir}}/scripts/installers/mssql-cmd-tools.sh",
"{{template_dir}}/scripts/installers/sqlpackage.sh",

View File

@@ -224,6 +224,7 @@
"{{template_dir}}/scripts/installers/mercurial.sh",
"{{template_dir}}/scripts/installers/miniconda.sh",
"{{template_dir}}/scripts/installers/mono.sh",
"{{template_dir}}/scripts/installers/kotlin.sh",
"{{template_dir}}/scripts/installers/mysql.sh",
"{{template_dir}}/scripts/installers/mssql-cmd-tools.sh",
"{{template_dir}}/scripts/installers/sqlpackage.sh",