11import  com.github.spotbugs.snom.SpotBugsTask 
22import  org.gradle.plugins.ide.idea.model.IdeaLanguageLevel 
3- import  org.springframework.boot.gradle.plugin.SpringBootPlugin 
43
54buildscript  {
65    repositories {
@@ -36,6 +35,8 @@ ext.javaProjects = subprojects.findAll {
3635    it. name !=  " genie-demo" &&  it. name !=  " genie-ddl" &&  it. name !=  " genie-docs" 
3736}
3837
38+ def  springBoot3ProjectNames =  [' genie-agent' ' genie-agent-app' ' genie-app' ' genie-common-internal' ' genie-swagger' ' genie-ui' ' genie-web' 
39+ 
3940allprojects  {
4041    apply plugin : " jacoco" 
4142    apply plugin : " idea" 
@@ -92,30 +93,32 @@ configure((Set<Project>) ext.javaProjects) {
9293        }
9394    }
9495
95-     subprojects  {
96-         if  (project . name  ==   ' genie-agent '   ||   project. name  ==   ' genie-web ' 
96+     dependencyManagement  {
97+         if  (springBoot3ProjectNames . contains( project. name) ) {
9798            imports {
9899                mavenBom " org.springframework.boot:spring-boot-dependencies:${ spring_boot_3_version} " 
99100                mavenBom " org.springframework.cloud:spring-cloud-dependencies:${ spring_cloud_3_version} " 
100101                mavenBom " io.awspring.cloud:spring-cloud-aws-dependencies:${ spring_cloud_aws_3_version} " 
101-                 mavenBom " software.amazon.awssdk:bom:2.13.1" 
102-                 mavenBom " io.zipkin.brave:brave-bom:5.13.3" 
103102            }
104103            dependencies {
105-                 implementation(" io.awspring.cloud:spring-cloud-aws-starter" 
104+                 dependency(" io.awspring.cloud:spring-cloud-aws-starter:${ spring_cloud_aws_3_version} " 
105+             }
106+         } else  {
107+             imports {
108+                 mavenBom " org.springframework.boot:spring-boot-dependencies:${ spring_boot_2_version} " 
109+                 mavenBom " org.springframework.cloud:spring-cloud-dependencies:${ spring_cloud_2_version} " 
110+                 mavenBom " io.awspring.cloud:spring-cloud-aws-dependencies:${ spring_cloud_aws_2_version} " 
106111            }
107112        }
108-     }
109113
110-     dependencyManagement {
111114        imports {
112-             mavenBom SpringBootPlugin . BOM_COORDINATES 
113-             mavenBom " org.springframework.cloud:spring-cloud-dependencies: ${ spring_cloud_version } " 
114-             mavenBom " io.awspring.cloud:spring-cloud-aws-dependencies: ${ spring_cloud_aws_version } " 
115+             mavenBom " com.amazonaws:aws-java-sdk-bom:1.12.780 " 
116+             mavenBom " software.amazon.awssdk:bom:2.30.17 " 
117+             mavenBom " io.zipkin.brave:brave-bom:5.13.3 " 
115118            mavenBom " com.google.protobuf:protobuf-bom:${ protobuf_version} " 
116119            mavenBom " com.squareup.okhttp3:okhttp-bom:4.9.2" 
117120            mavenBom " io.grpc:grpc-bom:${ grpc_version} " 
118-             mavenBom " org.spockframework:spock-bom:2.0 -groovy-3.0" 
121+             mavenBom " org.spockframework:spock-bom:2.4-M5 -groovy-3.0" 
119122            mavenBom " org.testcontainers:testcontainers-bom:1.16.3" 
120123        }
121124        dependencies {
@@ -172,6 +175,7 @@ configure((Set<Project>) ext.javaProjects) {
172175
173176    configurations {
174177        all* . exclude group : " javax.servlet" module : " servlet-api" 
178+         all* . exclude group : " org.apache.groovy" //  exclude groovy@4 dependencies
175179        all* . exclude group : " org.springframework.boot" module : " spring-boot-starter-logging" 
176180    }
177181
@@ -183,7 +187,15 @@ configure((Set<Project>) ext.javaProjects) {
183187        annotationProcessor(" net.jcip:jcip-annotations" 
184188        annotationProcessor(" com.github.spotbugs:spotbugs-annotations" 
185189
186-         implementation(" javax.annotation:javax.annotation-api:1.3.2" 
190+         if  (springBoot3ProjectNames. contains(project. name)) {
191+             implementation platform(" jakarta.platform:jakarta.jakartaee-bom:10.0.0" 
192+             implementation(" jakarta.servlet:jakarta.servlet-api" 
193+             implementation(" jakarta.validation:jakarta.validation-api:3.0.2" 
194+             implementation(" org.hibernate.validator:hibernate-validator:7.0.5.Final" 
195+             implementation(" org.glassfish:jakarta.el:4.0.2" 
196+         } else  {
197+             implementation(" javax.annotation:javax.annotation-api:1.3.2" 
198+         }
187199
188200        /* ******************************
189201         * Compile Dependencies 
@@ -220,7 +232,6 @@ configure((Set<Project>) ext.javaProjects) {
220232        testCompileOnly(" com.github.spotbugs:spotbugs-annotations" 
221233
222234        testRuntimeOnly(" jakarta.el:jakarta.el-api" 
223-         testRuntimeOnly(" org.glassfish:jakarta.el" 
224235        testRuntimeOnly(" org.junit.jupiter:junit-jupiter-engine" 
225236    }
226237
0 commit comments