92 lines
2.7 KiB
Plaintext
92 lines
2.7 KiB
Plaintext
plugins {
|
|
kotlin("jvm") version "1.9.25"
|
|
kotlin("plugin.spring") version "1.9.25"
|
|
id("org.springframework.boot") version "3.3.4"
|
|
id("io.spring.dependency-management") version "1.1.6"
|
|
}
|
|
|
|
group = "kr.lunaticbum.back"
|
|
version = "0.0.1-SNAPSHOT"
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(17)
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
compileOnly {
|
|
extendsFrom(configurations.annotationProcessor.get())
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
// implementation ("jakarta.servlet:jakarta.servlet-api") //스프링부트 3.0 이상
|
|
// implementation ("jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api") //스프링부트 3.0 이상
|
|
// implementation ("org.glassfish.web:jakarta.servlet.jsp.jstl") //스프링부트 3.0 이상
|
|
implementation ("org.apache.tomcat.embed:tomcat-embed-jasper")
|
|
implementation("org.springframework.boot:spring-boot-starter-data-mongodb-reactive")
|
|
implementation("org.springframework.boot:spring-boot-starter-web")
|
|
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
|
|
implementation("io.projectreactor.kotlin:reactor-kotlin-extensions")
|
|
implementation("org.jetbrains.kotlin:kotlin-reflect")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
|
|
compileOnly("org.projectlombok:lombok")
|
|
runtimeOnly("org.mariadb.jdbc:mariadb-java-client")
|
|
annotationProcessor("org.projectlombok:lombok")
|
|
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
|
testImplementation("io.projectreactor:reactor-test")
|
|
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
|
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
|
}
|
|
|
|
kotlin {
|
|
compilerOptions {
|
|
freeCompilerArgs.addAll("-Xjsr305=strict")
|
|
}
|
|
}
|
|
tasks.withType<org.gradle.jvm.tasks.Jar>() {
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
exclude("META-INF/BC1024KE.RSA", "META-INF/BC1024KE.SF", "META-INF/BC1024KE.DSA")
|
|
exclude("META-INF/BC2048KE.RSA", "META-INF/BC2048KE.SF", "META-INF/BC2048KE.DSA")
|
|
}
|
|
tasks.withType<Test> {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
|
|
tasks.jar {
|
|
manifest {
|
|
attributes["Main-Class"] = "kr.lunaticbum.back.lun.LunApplicationKt"
|
|
}
|
|
configurations["compileClasspath"].forEach { file: File ->
|
|
from(zipTree(file.absoluteFile))
|
|
}
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
}
|
|
|
|
tasks.jar {
|
|
|
|
// Otherwise you'll get a "No main manifest attribute" error
|
|
manifest {
|
|
attributes["Main-Class"] = "kr.lunaticbum.back.lun.LunApplicationKt"
|
|
}
|
|
|
|
// To avoid the duplicate handling strategy error
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
|
|
// To add all of the dependencies otherwise a "NoClassDefFoundError" error
|
|
from(sourceSets.main.get().output)
|
|
|
|
dependsOn(configurations.runtimeClasspath)
|
|
from({
|
|
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
|
|
})
|
|
}
|
|
|
|
|