File tree Expand file tree Collapse file tree 3 files changed +64
-0
lines changed
src/main/kotlin/org/unimesh/eval/eval Expand file tree Collapse file tree 3 files changed +64
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Simple Runtime
2
+
3
+ Make function code runnable
4
+
Original file line number Diff line number Diff line change
1
+ @Suppress(" DSL_SCOPE_VIOLATION" )
2
+ plugins {
3
+ alias(libs.plugins.kotlin.jvm)
4
+ alias(libs.plugins.shadow)
5
+ alias(libs.plugins.serialization)
6
+ application
7
+ }
8
+
9
+ repositories {
10
+ mavenCentral()
11
+ }
12
+
13
+ dependencies {
14
+ implementation(libs.clikt)
15
+ implementation(libs.serialization.json)
16
+
17
+ // Logging
18
+ implementation(libs.logging.slf4j.api)
19
+ implementation(libs.logging.logback.classic)
20
+
21
+ testImplementation(kotlin(" test" ))
22
+
23
+ testImplementation(libs.bundles.test)
24
+ }
25
+
26
+ tasks.test {
27
+ useJUnitPlatform()
28
+ }
29
+
30
+
31
+ application {
32
+ mainClass.set(" cc.unitmesh.eval.checker.MainKt" )
33
+ }
34
+
35
+ tasks {
36
+ shadowJar {
37
+ manifest {
38
+ attributes(Pair (" Main-Class" , " cc.unitmesh.eval.checker.MainKt" ))
39
+ }
40
+ // minimize()
41
+ dependencies {
42
+ exclude(dependency(" org.junit.jupiter:.*:.*" ))
43
+ exclude(dependency(" org.junit:.*:.*" ))
44
+ exclude(dependency(" junit:.*:.*" ))
45
+ }
46
+ }
47
+ }
Original file line number Diff line number Diff line change
1
+ package org.unimesh.eval.eval
2
+
3
+ import com.github.ajalt.clikt.core.CliktCommand
4
+ import com.github.ajalt.clikt.parameters.options.option
5
+
6
+ class Hello : CliktCommand () {
7
+ val name by option(help = " your name" )
8
+ override fun run () {
9
+ echo(" Hello, $name !" )
10
+ }
11
+ }
12
+
13
+ fun main (args : Array <String >) = Hello ().main(args)
You can’t perform that action at this time.
0 commit comments