build.gradle 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. plugins {
  2. alias(libs.plugins.org.springframework.boot)
  3. alias(libs.plugins.io.spring.dependency.management)
  4. id "nebula.integtest" version "8.2.0"
  5. id 'java'
  6. id 'org.hibernate.orm' version '7.0.6.Final'
  7. id "org.graalvm.buildtools.native" version "0.10.2"
  8. }
  9. repositories {
  10. mavenLocal()
  11. mavenCentral()
  12. maven { url "https://repo.spring.io/milestone" }
  13. maven { url "https://repo.spring.io/snapshot" }
  14. }
  15. dependencies {
  16. implementation platform(libs.org.springframework.spring.framework.bom)
  17. implementation platform(libs.org.springframework.security.spring.security.bom)
  18. implementation platform(libs.org.springframework.data.spring.data.bom)
  19. implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
  20. implementation 'org.springframework.boot:spring-boot-starter-security'
  21. implementation 'org.springframework.boot:spring-boot-starter-web'
  22. implementation 'org.springframework.security:spring-security-data'
  23. implementation 'com.h2database:h2'
  24. testImplementation 'org.springframework.boot:spring-boot-starter-test'
  25. testImplementation 'org.springframework.boot:spring-boot-security-test'
  26. testImplementation 'org.springframework.security:spring-security-test'
  27. }
  28. group = "org.example"
  29. hibernate {
  30. enhancement {
  31. enableAssociationManagement = true
  32. }
  33. }
  34. tasks.withType(Test).configureEach {
  35. useJUnitPlatform()
  36. outputs.upToDateWhen { false }
  37. }
  38. if (plugins.hasPlugin("io.spring.javaformat")) {
  39. compileJava {
  40. dependsOn("formatMain")
  41. }
  42. tasks.checkFormatMain {
  43. dependsOn("formatMain")
  44. }
  45. compileTestJava {
  46. dependsOn("formatTest")
  47. }
  48. tasks.checkFormatTest {
  49. dependsOn("formatTest")
  50. }
  51. }