From 28408f6e0191493479e0d7f444747618dcbf93c4 Mon Sep 17 00:00:00 2001 From: donggyu Date: Mon, 4 Sep 2023 01:58:06 +0900 Subject: [PATCH] =?UTF-8?q?[BE]=20BUILD:=20kotlin=20build=20jar=EB=A1=9C?= =?UTF-8?q?=20=EC=8B=A4=ED=96=89=20=EA=B0=80=EB=8A=A5=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cron/build.gradle | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/cron/build.gradle b/cron/build.gradle index 68982abdf..fbbc690c1 100644 --- a/cron/build.gradle +++ b/cron/build.gradle @@ -26,11 +26,11 @@ dependencies { implementation "org.jetbrains.exposed:exposed-java-time:${exposedVersion}" runtimeOnly "org.mariadb.jdbc:mariadb-java-client:${mariadbVersion}" implementation "com.zaxxer:HikariCP:5.0.1" - implementation("io.github.microutils:kotlin-logging-jvm:2.0.10") - implementation("org.slf4j:slf4j-api:1.7.30") - implementation 'org.slf4j:slf4j-simple:1.7.25' + implementation "io.github.microutils:kotlin-logging-jvm:2.0.10" + implementation "org.slf4j:slf4j-api:1.7.30" + implementation "org.slf4j:slf4j-simple:1.7.25" - testImplementation 'org.jetbrains.kotlin:kotlin-test' + testImplementation "org.jetbrains.kotlin:kotlin-test" testRuntimeOnly "com.h2database:h2:${h2Version}" } @@ -48,9 +48,21 @@ test { } kotlin { - jvmToolchain{languageVersion.set(JavaLanguageVersion.of(17))} + jvmToolchain(17) } application { - mainClassName = 'MainKt' + mainClass.set("MainKt") +} + +jar { + manifest { + attributes 'Main-Class': 'MainKt' + } + from { + configurations.runtimeClasspath.collect { + it.isDirectory() ? it : zipTree(it) + } + } + duplicatesStrategy = DuplicatesStrategy.EXCLUDE } \ No newline at end of file