diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..56f7ed8 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,41 @@ +import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar + +group = "org.example" +version = "1.0-SNAPSHOT" + +plugins { + application + kotlin("jvm") version "1.3.61" + kotlin("plugin.spring") version "1.3.50" + id("org.springframework.boot") version "2.1.3.RELEASE" + id("io.spring.dependency-management") version "1.0.9.RELEASE" + id("com.github.johnrengelman.shadow") version "5.0.0" +} + +application { + mainClassName = "com.example.sample.SpringSampleApplicationKt" +} + +repositories { + mavenCentral() + jcenter() +} + +dependencies { + implementation(group = "org.springframework.boot", name = "spring-boot-starter") + implementation(group = "org.springframework.boot", name = "spring-boot-starter-web") + implementation(group = "com.fasterxml.jackson.module", name = "jackson-module-kotlin") +} + +tasks { + withType { + manifest { + attributes( + mapOf( + "Main-Class" to application.mainClassName + ) + ) + } + } +} +