build.gradle.kts 1012 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
  2. plugins {
  3. id("org.springframework.boot") version "2.5.0"
  4. id("io.spring.dependency-management") version "1.0.11.RELEASE"
  5. kotlin("jvm") version "1.5.10"
  6. kotlin("plugin.spring") version "1.5.10"
  7. }
  8. group = "com.demo"
  9. version = "0.0.1-SNAPSHOT"
  10. java.sourceCompatibility = JavaVersion.VERSION_11
  11. repositories {
  12. mavenCentral()
  13. }
  14. dependencies {
  15. implementation("org.springframework.boot:spring-boot-starter-data-jdbc")
  16. implementation("org.springframework.boot:spring-boot-starter-web")
  17. implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
  18. implementation("org.jetbrains.kotlin:kotlin-reflect")
  19. implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
  20. runtimeOnly("mysql:mysql-connector-java")
  21. testImplementation("org.springframework.boot:spring-boot-starter-test")
  22. }
  23. tasks.withType<KotlinCompile> {
  24. kotlinOptions {
  25. freeCompilerArgs = listOf("-Xjsr305=strict")
  26. jvmTarget = "11"
  27. }
  28. }
  29. tasks.withType<Test> {
  30. useJUnitPlatform()
  31. }