Skip to content

Commit

Permalink
feat: init project for picker
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Dec 3, 2023
1 parent 99ac469 commit 6658674
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 5 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Unit Eval framework

15 changes: 11 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
kotlin("jvm") version "1.9.0"
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.serialization)
}

group = "org.unitmesh"
Expand All @@ -10,12 +11,18 @@ repositories {
}

dependencies {
testImplementation("org.jetbrains.kotlin:kotlin-test")
implementation(libs.javaparser)
implementation(libs.javaparser.serialization)
implementation(libs.javaparser.symbol.solver.core)

testImplementation(kotlin("test"))
testImplementation(libs.bundles.test)
}

tasks.test {
useJUnitPlatform()
}

kotlin {
jvmToolchain(17)
}
jvmToolchain(11)
}
48 changes: 48 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[versions]
kotlin = "1.9.21"

kotlinxSerialization = "1.6.2"

junit = "5.10.1"
kotest = "5.8.0"

mockk = "1.13.3"
assertj = "3.22.0"
javaparser = "3.25.6"

logback = "1.4.14"
slf4j = "2.0.9"

clikt = "4.2.1"

[plugins]
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
shadow = "com.github.johnrengelman.shadow:8.1.1"

[libraries]
kotlin-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin-plugin-dev = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
# a mighty tiny command line interface

clikt = { group = "com.github.ajalt.clikt", name = "clikt", version.ref = "clikt" }

serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerialization" }

javaparser = { module = "com.github.javaparser:javaparser-core", version.ref = "javaparser" }
javaparser-serialization = { module = "com.github.javaparser:javaparser-core-serialization", version.ref = "javaparser" }
javaparser-symbol-solver-core = { module = "com.github.javaparser:javaparser-symbol-solver-core", version.ref = "javaparser" }

logging-slf4j-api = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j" }
logging-logback-classic = { group = "ch.qos.logback", name = "logback-classic", version.ref = "logback" }

# Testing
test-junit-api = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "junit" }
test-junit-params = { group = "org.junit.jupiter", name = "junit-jupiter-params", version.ref = "junit" }
test-junit-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junit" }
test-kotlintest-assertions = { module = "io.kotest:kotest-assertions-core", version.ref = "kotest" }
test-mockk = { group = "io.mockk", name = "mockk", version.ref = "mockk" }
test-assertj = { group = "org.assertj", name = "assertj-core", version.ref = "assertj" }

[bundles]
test = ["test-junit-params", "test-kotlintest-assertions", "test-mockk", "test-assertj"]
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.5.0"
}
rootProject.name = "autoeval"
rootProject.name = "UnitEval"

include("unit-picker")
include("unit-checker")
28 changes: 28 additions & 0 deletions unit-picker/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.shadow)
alias(libs.plugins.serialization)
application
}

repositories {
mavenCentral()
}

dependencies {
implementation(libs.clikt)
implementation(libs.serialization.json)

// Logging
implementation(libs.logging.slf4j.api)
implementation(libs.logging.logback.classic)

testImplementation(kotlin("test"))

testImplementation(libs.bundles.test)
}

tasks.test {
useJUnitPlatform()
}
13 changes: 13 additions & 0 deletions unit-picker/src/main/kotlin/org/unimesh/eval/picker/Main.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.unimesh.eval.picker

import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.parameters.options.option

class Hello : CliktCommand() {
val name by option(help = "your name")
override fun run() {
echo("Hello, $name!")
}
}

fun main(args: Array<String>) = Hello().main(args)

0 comments on commit 6658674

Please sign in to comment.