浏览代码

add kotlin

txlyre 1 年之前
父节点
当前提交
6546b95377
共有 2 个文件被更改,包括 12 次插入0 次删除
  1. 7 0
      langs/kotlin/Dockerfile
  2. 5 0
      langs/kotlin/run.sh

+ 7 - 0
langs/kotlin/Dockerfile

@@ -0,0 +1,7 @@
+RUN apt-get install wget unzip -y
+RUN apt-get install default-jdk -y
+RUN wget -c https://github.com/JetBrains/kotlin/releases/download/v1.9.23/kotlin-compiler-1.9.23.zip
+RUN unzip kotlin-compiler-1.9.23.zip
+RUN mv kotlinc/bin/* /usr/local/bin/
+RUN rm -rf kotlinc
+RUN rm kotlin-compiler-1.9.23.zip

+ 5 - 0
langs/kotlin/run.sh

@@ -0,0 +1,5 @@
+IN="$(mktemp --suffix .kts)"
+
+cat > "$IN"
+
+kotlinc -script "$IN"