diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 7b612a26b..1ff73ab0f 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -78,6 +78,11 @@ function Get-GoVersion { return "Go $goVersion" } +function Get-KotlinVersion { + $kotlinVersion = $((cmd /c "kotlinc -version 2>&1") | Out-String).split(" ")[2] + return "Kotlin $kotlinVersion" +} + function Get-PHPVersion { ($(php --version) | Out-String) -match "PHP (?\d+\.\d+\.\d+)" | Out-Null $phpVersion = $Matches.Version diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index b2f25b908..ab2cde8e4 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -39,7 +39,8 @@ $markdown += New-MDList -Style Unordered -Lines (@( (Get-PerlVersion), (Get-PHPVersion), (Get-PythonVersion), - (Get-RubyVersion) + (Get-RubyVersion), + (Get-KotlinVersion) ) | Sort-Object ) diff --git a/images/win/scripts/Tests/ChocoPackages.Tests.ps1 b/images/win/scripts/Tests/ChocoPackages.Tests.ps1 index ce90ac79e..965f114f8 100644 --- a/images/win/scripts/Tests/ChocoPackages.Tests.ps1 +++ b/images/win/scripts/Tests/ChocoPackages.Tests.ps1 @@ -96,4 +96,12 @@ Describe "CMake" { It "cmake" { "cmake --version" | Should -ReturnZeroExitCode } +} + +Describe "Kotlin" { + $kotlinPackages = @("kotlinc", "kotlinc-js", "kotlinc-jvm") + + It " is available" -TestCases ($kotlinPackages | ForEach-Object { @{ toolName = $_ } }) { + "$toolName -version" | Should -ReturnZeroExitCode + } } \ No newline at end of file diff --git a/images/win/toolsets/toolset-2016.json b/images/win/toolsets/toolset-2016.json index 09a073f7d..ceb7e974e 100644 --- a/images/win/toolsets/toolset-2016.json +++ b/images/win/toolsets/toolset-2016.json @@ -387,6 +387,7 @@ { "name": "tortoisesvn" }, { "name": "swig" }, { "name": "vswhere" }, + { "name": "kotlinc" }, { "name": "julia", "args": [ "--ia", "/DIR=C:\\Julia" ] diff --git a/images/win/toolsets/toolset-2019.json b/images/win/toolsets/toolset-2019.json index e5416a269..81439fb6e 100644 --- a/images/win/toolsets/toolset-2019.json +++ b/images/win/toolsets/toolset-2019.json @@ -413,6 +413,7 @@ { "name": "tortoisesvn" }, { "name": "swig" }, { "name": "vswhere" }, + { "name": "kotlinc" }, { "name": "julia", "args": [ "--ia", "/DIR=C:\\Julia" ]