build.gradle 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. plugins {
  2. id 'java'
  3. id 'org.springframework.boot' version '3.4.0'
  4. id 'io.spring.dependency-management' version '1.1.6'
  5. id 'org.hibernate.orm' version '6.6.2.Final'
  6. }
  7. ext {
  8. hutoolVersion = "5.8.32"
  9. }
  10. allprojects {
  11. apply plugin: 'java'
  12. group = 'com.sikey.wa04'
  13. version = '1.0.1'
  14. ext {
  15. set('springCloudVersion', "2024.0.0")
  16. hutoolVersion = "5.8.32"
  17. gvavaVersion = "33.3.1-jre"
  18. }
  19. repositories {
  20. maven { url 'https://maven.aliyun.com/repository/public' }
  21. mavenCentral()
  22. }
  23. hibernate {
  24. enhancement {
  25. enableAssociationManagement = true
  26. }
  27. }
  28. test {
  29. useJUnitPlatform()
  30. }
  31. configurations {
  32. compileOnly {
  33. extendsFrom annotationProcessor
  34. }
  35. }
  36. java {
  37. toolchain {
  38. languageVersion = JavaLanguageVersion.of(23)
  39. }
  40. }
  41. task printVersion {
  42. doLast {
  43. println "Project: ${project.name}, springCloudVersion: ${springCloudVersion}, hutoolVersion: ${hutoolVersion}"
  44. }
  45. }
  46. }
  47. subprojects { Project project ->
  48. apply plugin: 'io.spring.dependency-management'
  49. if (project.name != 'app-gateway') {
  50. dependencies {
  51. implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
  52. implementation 'org.springframework.boot:spring-boot-starter-data-redis'
  53. implementation 'org.springframework.boot:spring-boot-starter-amqp'
  54. }
  55. }
  56. dependencies {
  57. implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
  58. implementation 'org.springframework.boot:spring-boot-starter-validation'
  59. implementation 'org.springframework.boot:spring-boot-starter-actuator'
  60. implementation 'org.springframework.boot:spring-boot-starter-websocket'
  61. // https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp
  62. implementation 'com.squareup.okhttp3:okhttp:4.12.0'
  63. // https://mvnrepository.com/artifact/com.eatthepath/pushy
  64. implementation 'com.eatthepath:pushy:0.15.4'
  65. implementation "cn.hutool:hutool-all:${hutoolVersion}"
  66. // aliyun oso sdk
  67. implementation 'com.aliyun.oss:aliyun-sdk-oss:3.17.4'
  68. implementation 'javax.activation:activation:1.1.1'
  69. implementation 'javax.xml.bind:jaxb-api:2.3.1'
  70. implementation 'org.glassfish.jaxb:jaxb-runtime:2.3.3'
  71. runtimeOnly 'com.mysql:mysql-connector-j'
  72. testImplementation 'org.springframework.amqp:spring-rabbit-test'
  73. testImplementation 'org.springframework.security:spring-security-test'
  74. compileOnly 'org.projectlombok:lombok'
  75. annotationProcessor 'org.projectlombok:lombok'
  76. annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
  77. testImplementation 'org.springframework.boot:spring-boot-starter-test'
  78. testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
  79. }
  80. dependencyManagement {
  81. imports {
  82. mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
  83. }
  84. }
  85. }