-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM openjdk:8-jdk-alpine | ||
|
||
RUN apk add --no-cache bash | ||
|
||
RUN apk add --no-cache curl unzip && \ | ||
curl -LO "https://github.com/JetBrains/kotlin/releases/download/v2.1.10/kotlin-compiler-2.1.10.zip" && \ | ||
unzip kotlin-compiler-2.1.10.zip -d /usr/local && \ | ||
ln -s /usr/local/kotlin-compiler-2.1.10/bin/kotlinc /usr/local/bin/kotlinc && \ | ||
ln -s /usr/local/kotlin-compiler-2.1.10/bin/kotlin /usr/local/bin/kotlin && \ | ||
rm kotlin-compiler-2.1.10.zip | ||
|
||
RUN mkdir -p /app | ||
WORKDIR /app | ||
|
||
ENV PATH=$PATH:/usr/local/kotlinc/bin | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"Template": "kotlin_2_1_10", | ||
"Labels": ["kotlin"], | ||
"Enabled": true, | ||
"Connections": ["postgres"], | ||
"ContainerOptions": { | ||
"CompileTTL": 30, | ||
"RunTTL": 5, | ||
"MemoryLimit": 524288000 | ||
}, | ||
"Workdir": "/app", | ||
"IsSupportPackage": true, | ||
|
||
"Actions": { | ||
"default": { | ||
"Id": "default", | ||
"IsDefault": true, | ||
"Name": "Kotlin (2.1.10)", | ||
"CompileCmd": "kotlinc *.kt -include-runtime -d app.jar", | ||
"RunCmd": "java -jar app.jar {ARGS} < {STDIN}", | ||
"ScriptOptions": { | ||
"SourceFile": "Main.kt" | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
### Kotlin 2.1.10 | ||
POST {{url}}/run | ||
Content-Type: application/json | ||
|
||
{ | ||
"templateId": "kotlin_2_1_10", | ||
"files": { | ||
"Main.kt": "abstract class Person(val name: String) {\n abstract fun greet()\n}\n\ninterface FoodConsumer {\n fun eat()\n fun pay(amount: Int) = println(\"Delicious! Here's $amount bucks!\")\n}\n\nclass RestaurantCustomer(name: String, val dish: String) : Person(name), FoodConsumer {\n fun order() = println(\"$dish, please!\")\n override fun eat() = println(\"*Eats $dish*\")\n override fun greet() = println(\"It's me, $name.\")\n}\n\nfun main() {\n val sam = RestaurantCustomer(\"Sam\", \"Mixed salad\")\n sam.greet() // An implementation of an abstract function\n sam.order() // A member function\n sam.eat() // An implementation of an interface function\n sam.pay(10) // A default implementation in an interface\n}\n" | ||
}, | ||
"args": "--name Mark", | ||
"stdin": "100.00", | ||
"externalOptions": { | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.