@@ -21,9 +21,8 @@ tasks.named<KotlinCompile>("compileKotlin") {
2121
2222// Spring scans the integration test apps' own bytecode with its repackaged ASM at startup, and
2323// the ASM in Spring before 5.3.26 fails on class files as new as the toolchain's: "Unsupported
24- // class file major version 65". In the Spring Boot 2.x matrix, 2.4.13 (Spring 5.3.13) reads up
25- // to Java 18 and 2.7.0 (Spring 5.3.20) up to Java 19, so the suites target 17. Remove this once
26- // the matrix drops 2.4.13 and moves 2.7.0 to 2.7.10 or later.
24+ // class file major version 65". The Spring Boot 2.x matrix's 2.7.0 (Spring 5.3.20) reads up to
25+ // Java 19, so the suites target 17. Remove this once the matrix moves 2.7.0 to 2.7.10 or later.
2726// The suites are Kotlin only. Their Java tasks keep the toolchain's level, because it decides
2827// which Java version their classpaths ask for, and sentry-test-support needs the toolchain's.
2928tasks
@@ -137,13 +136,6 @@ tasks.jar {
137136 }
138137}
139138
140- // Spring Boot supports GraphQL only from 2.7, and its Kafka auto-configuration needs 2.7 for the
141- // spring-kafka version Sentry integrates with. The Spring Boot 2 matrix also covers older versions.
142- val bootSupportsGraphqlAndKafka =
143- libs.versions.springboot2.get().split(" ." ).let { (major, minor) ->
144- major.toInt() > 2 || minor.toInt() >= 7
145- }
146-
147139// The OpenTelemetry agent tests run this app in a child JVM, on its own classpath like a real app
148140// with the agent attached, rather than on the test's classpath.
149141val agentFixture = sourceSets.create(" agentFixture" )
@@ -164,20 +156,18 @@ dependencies {
164156 " agentFixtureImplementation" (platform(libs.springboot2.bom))
165157 " agentFixtureImplementation" (projects.sentrySpringBootStarter)
166158 " agentFixtureImplementation" (projects.sentryAsyncProfiler)
159+ " agentFixtureImplementation" (projects.sentryGraphql)
167160 " agentFixtureImplementation" (projects.sentryJdbc)
161+ " agentFixtureImplementation" (projects.sentryKafka)
168162 " agentFixtureImplementation" (projects.sentryLogback)
169163 " agentFixtureImplementation" (kotlin(Config .kotlinStdLib))
170164 " agentFixtureImplementation" (libs.otel)
165+ " agentFixtureImplementation" (libs.springboot.starter.graphql)
171166 " agentFixtureImplementation" (libs.springboot.starter.jdbc)
172167 " agentFixtureImplementation" (libs.springboot.starter.web)
173168 " agentFixtureImplementation" (libs.springboot.starter.webflux)
169+ " agentFixtureImplementation" (libs.spring.kafka2)
174170 " agentFixtureRuntimeOnly" (libs.hsqldb)
175- if (bootSupportsGraphqlAndKafka) {
176- " agentFixtureImplementation" (projects.sentryGraphql)
177- " agentFixtureImplementation" (projects.sentryKafka)
178- " agentFixtureImplementation" (libs.springboot.starter.graphql)
179- " agentFixtureImplementation" (libs.spring.kafka2)
180- }
181171
182172 otelAgentJar(projects.sentryOpentelemetry.sentryOpentelemetryAgent)
183173}
@@ -192,7 +182,9 @@ testing {
192182 implementation(platform(libs.springboot2.bom))
193183 implementation(projects.sentrySpringBootStarter)
194184 implementation(projects.sentryAsyncProfiler)
185+ implementation(projects.sentryGraphql)
195186 implementation(projects.sentryJdbc)
187+ implementation(projects.sentryKafka)
196188 implementation(projects.sentryLogback)
197189 implementation(projects.sentryOkhttp)
198190 implementation(projects.sentryTestSupport)
@@ -202,18 +194,14 @@ testing {
202194 implementation(libs.okhttp)
203195 implementation(libs.springboot.starter.aop)
204196 implementation(libs.springboot.starter.cache)
197+ implementation(libs.springboot.starter.graphql)
205198 implementation(libs.springboot.starter.jdbc)
206199 implementation(libs.springboot.starter.test)
207200 implementation(libs.springboot.starter.web)
208201 implementation(libs.springboot.starter.webflux)
202+ implementation(libs.spring.kafka2)
203+ implementation(libs.spring.kafka2.test)
209204 runtimeOnly(libs.hsqldb)
210- if (bootSupportsGraphqlAndKafka) {
211- implementation(projects.sentryGraphql)
212- implementation(projects.sentryKafka)
213- implementation(libs.springboot.starter.graphql)
214- implementation(libs.spring.kafka2)
215- implementation(libs.spring.kafka2.test)
216- }
217205 }
218206 }
219207
@@ -224,16 +212,14 @@ testing {
224212 implementation(platform(libs.springboot2.bom))
225213 implementation(projects.sentrySpringBootStarter)
226214 implementation(projects.sentryAsyncProfiler)
215+ implementation(projects.sentryGraphql)
227216 implementation(projects.sentryLogback)
228217 implementation(projects.sentryTestSupport)
229218 implementation(libs.kotlin.test.junit)
230219 implementation(libs.google.truth)
220+ implementation(libs.springboot.starter.graphql)
231221 implementation(libs.springboot.starter.test)
232222 implementation(libs.springboot.starter.webflux)
233- if (bootSupportsGraphqlAndKafka) {
234- implementation(projects.sentryGraphql)
235- implementation(libs.springboot.starter.graphql)
236- }
237223 }
238224 }
239225
@@ -246,24 +232,22 @@ testing {
246232 implementation(projects.sentrySpringBootStarter)
247233 implementation(projects.sentryOpentelemetry.sentryOpentelemetryAgentlessSpring)
248234 implementation(projects.sentryAsyncProfiler)
235+ implementation(projects.sentryGraphql)
249236 implementation(projects.sentryJdbc)
237+ implementation(projects.sentryKafka)
250238 implementation(projects.sentryLogback)
251239 implementation(projects.sentryTestSupport)
252240 implementation(libs.kotlin.test.junit)
253241 implementation(libs.google.truth)
254242 implementation(libs.springboot.starter.aop)
243+ implementation(libs.springboot.starter.graphql)
255244 implementation(libs.springboot.starter.jdbc)
256245 implementation(libs.springboot.starter.test)
257246 implementation(libs.springboot.starter.web)
258247 implementation(libs.springboot.starter.webflux)
248+ implementation(libs.spring.kafka2)
249+ implementation(libs.spring.kafka2.test)
259250 runtimeOnly(libs.hsqldb)
260- if (bootSupportsGraphqlAndKafka) {
261- implementation(projects.sentryGraphql)
262- implementation(projects.sentryKafka)
263- implementation(libs.springboot.starter.graphql)
264- implementation(libs.spring.kafka2)
265- implementation(libs.spring.kafka2.test)
266- }
267251 }
268252 }
269253
@@ -278,9 +262,7 @@ testing {
278262 // For TestRestTemplate. Only the app's JVM runs the agent, so it doesn't trace the tests.
279263 implementation(libs.springboot.starter.test)
280264 implementation(libs.springboot.starter.web)
281- if (bootSupportsGraphqlAndKafka) {
282- implementation(libs.spring.kafka2.test)
283- }
265+ implementation(libs.spring.kafka2.test)
284266 }
285267 targets.all { testTask.configure { runAgentFixture(autoInit = true ) } }
286268 }
@@ -324,10 +306,5 @@ listOf(
324306 " compileIntegrationTestOtelAgentKotlin" ,
325307 )
326308 .forEach {
327- tasks.named<KotlinCompile >(it) {
328- compilerOptions.javaParameters = true
329- if (! bootSupportsGraphqlAndKafka) {
330- exclude(" **/Graphql*" , " **/Greeting*" , " **/Kafka*" )
331- }
332- }
309+ tasks.named<KotlinCompile >(it) { compilerOptions.javaParameters = true }
333310 }
0 commit comments