Updated to `Kotlin 1.8.20`

This commit is contained in:
RVG|lory 2023-04-08 17:35:00 +02:00 committed by GitHub
parent 86d897d580
commit 0c253a667d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 36 additions and 0 deletions

13
packages/kotlin/1.8.20/build.sh vendored Normal file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
# Download and extract JDK8
curl -L "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10/OpenJDK8U-jdk_x64_linux_hotspot_8u292b10.tar.gz" -o jdk.tar.gz
tar xzf jdk.tar.gz --strip-components=1
rm jdk.tar.gz
# Download and extract Kotlin
curl -L "https://github.com/JetBrains/kotlin/releases/download/v1.8.20/kotlin-compiler-1.8.20.zip" -o kotlin.zip
unzip kotlin.zip
rm kotlin.zip
cp -r kotlinc/* .
rm -rf kotlinc

6
packages/kotlin/1.8.20/compile vendored Normal file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
rename 's/$/\.kt/' "$@" # Add .kt extension
# Compile Kotlin code to a jar file
kotlinc *.kt -include-runtime -d code.jar

4
packages/kotlin/1.8.20/environment vendored Normal file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Add java and kotlinc to path
export PATH=$PWD/bin:$PATH

5
packages/kotlin/1.8.20/metadata.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"language": "kotlin",
"version": "1.8.20",
"aliases": ["kt"]
}

5
packages/kotlin/1.8.20/run vendored Normal file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Run jar file
shift
java -jar code.jar "$@"

3
packages/kotlin/1.8.20/test.kt vendored Normal file
View File

@ -0,0 +1,3 @@
fun main() {
println("OK")
}