build.gradle.kts 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. plugins {
  2. java
  3. id("org.springframework.boot") version "3.5.13"
  4. id("io.spring.dependency-management") version "1.1.7"
  5. }
  6. group = "space.anyi"
  7. version = "0.0.1-SNAPSHOT"
  8. description = "serve"
  9. java {
  10. toolchain {
  11. languageVersion = JavaLanguageVersion.of(17)
  12. }
  13. }
  14. configurations {
  15. compileOnly {
  16. extendsFrom(configurations.annotationProcessor.get())
  17. }
  18. }
  19. repositories {
  20. mavenCentral()
  21. }
  22. dependencies {
  23. implementation("org.springframework.boot:spring-boot-starter-actuator")
  24. implementation("org.springframework.boot:spring-boot-starter-data-jpa")
  25. implementation("org.springframework.boot:spring-boot-starter-security")
  26. implementation("org.springframework.boot:spring-boot-starter-validation")
  27. implementation("org.springframework.boot:spring-boot-starter-web")
  28. implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.16")
  29. // Source: https://mvnrepository.com/artifact/com.alibaba/druid-spring-boot-3-starter
  30. implementation("com.alibaba:druid-spring-boot-3-starter:1.2.28")
  31. developmentOnly("org.springframework.boot:spring-boot-devtools")
  32. runtimeOnly("org.postgresql:postgresql")
  33. annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
  34. testImplementation("org.springframework.boot:spring-boot-starter-test")
  35. testImplementation("org.springframework.security:spring-security-test")
  36. testRuntimeOnly("org.junit.platform:junit-platform-launcher")
  37. }
  38. tasks.withType<Test> {
  39. useJUnitPlatform()
  40. }