diff --git a/settings.gradle.kts b/settings.gradle.kts index 0ff8848b..b1cbf470 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -14,6 +14,8 @@ include( "unit-eval", "unit-cli", + "unit-distillation", + "code-quality", "examples:project-example", diff --git a/unit-distillation/README.md b/unit-distillation/README.md new file mode 100644 index 00000000..3786c149 --- /dev/null +++ b/unit-distillation/README.md @@ -0,0 +1,9 @@ +# Unit Distillation + +Support case: + +- explain code +- find bug +- trace exception +- refactor code +- code review diff --git a/unit-distillation/build.gradle.kts b/unit-distillation/build.gradle.kts new file mode 100644 index 00000000..459a19ee --- /dev/null +++ b/unit-distillation/build.gradle.kts @@ -0,0 +1,44 @@ +@Suppress("DSL_SCOPE_VIOLATION") +plugins { + alias(libs.plugins.kotlin.jvm) + alias(libs.plugins.shadow) + alias(libs.plugins.serialization) + application +} + +dependencies { + implementation(libs.clikt) + implementation(libs.serialization.json) + + implementation(libs.cf.language) + implementation(libs.kaml) + + // Logging + implementation(libs.logging.slf4j.api) + implementation(libs.logging.logback.classic) + + testImplementation(kotlin("test")) + + testImplementation(libs.bundles.test) +} + +tasks.test { + useJUnitPlatform() +} + +application { + mainClass.set("cc.unitmesh.runner.DistillateKt") +} + +tasks { + shadowJar { + manifest { + attributes(Pair("Main-Class", "cc.unitmesh.runner.DistillateKt")) + } + dependencies { + exclude(dependency("org.junit.jupiter:.*:.*")) + exclude(dependency("org.junit:.*:.*")) + exclude(dependency("junit:.*:.*")) + } + } +} diff --git a/unit-distillation/src/main/kotlin/cc/unitmesh/distillate/Distillate.kt b/unit-distillation/src/main/kotlin/cc/unitmesh/distillate/Distillate.kt new file mode 100644 index 00000000..4d52c84f --- /dev/null +++ b/unit-distillation/src/main/kotlin/cc/unitmesh/distillate/Distillate.kt @@ -0,0 +1,12 @@ +package cc.unitmesh.distillate + +import com.github.ajalt.clikt.core.CliktCommand + +fun main(args: Array) = DistillateCommand().main(args) + +class DistillateCommand : CliktCommand() { + override fun run() { + TODO("Not yet implemented") + } + +}