@@ -31,18 +31,6 @@ configurations {
31
31
}
32
32
}
33
33
34
- tasks {
35
- named<JavaCompile >(" compileJavaSpring3Java" ) {
36
- sourceCompatibility = " 17"
37
- targetCompatibility = " 17"
38
- options.release.set(17 )
39
- }
40
-
41
- withType(Jar ::class ) {
42
- from(sourceSets[" javaSpring3" ].output)
43
- }
44
- }
45
-
46
34
dependencies {
47
35
compileOnly(" org.springframework.boot:spring-boot-autoconfigure:$springBootVersion " )
48
36
annotationProcessor(" org.springframework.boot:spring-boot-autoconfigure-processor:$springBootVersion " )
@@ -106,15 +94,15 @@ dependencies {
106
94
testImplementation(" io.opentelemetry:opentelemetry-exporter-zipkin" )
107
95
testImplementation(project(" :instrumentation-annotations" ))
108
96
97
+ // needed for the Spring Boot 3 support
98
+ implementation(project(" :instrumentation:spring:spring-webmvc:spring-webmvc-6.0:library" ))
99
+
109
100
// give access to common classes, e.g. InstrumentationConfigUtil
110
101
add(" javaSpring3CompileOnly" , files(sourceSets.main.get().output.classesDirs))
111
102
add(" javaSpring3CompileOnly" , " org.springframework.boot:spring-boot-starter-web:3.2.4" )
112
103
add(" javaSpring3CompileOnly" , " io.opentelemetry:opentelemetry-sdk-extension-autoconfigure" )
113
104
add(" javaSpring3CompileOnly" , project(" :instrumentation:spring:spring-web:spring-web-3.1:library" ))
114
105
add(" javaSpring3CompileOnly" , project(" :instrumentation:spring:spring-webmvc:spring-webmvc-6.0:library" ))
115
-
116
- // needed for the Spring Boot 3 support
117
- implementation(project(" :instrumentation:spring:spring-webmvc:spring-webmvc-6.0:library" ))
118
106
}
119
107
120
108
val latestDepTest = findProperty(" testLatestDeps" ) as Boolean
@@ -151,9 +139,7 @@ testing {
151
139
}
152
140
}
153
141
}
154
- }
155
142
156
- suites {
157
143
val testLogbackMissing by registering(JvmTestSuite ::class ) {
158
144
dependencies {
159
145
implementation(project())
@@ -166,6 +152,27 @@ testing {
166
152
}
167
153
}
168
154
}
155
+
156
+ val testSpring3 by registering(JvmTestSuite ::class ) {
157
+ dependencies {
158
+ implementation(project())
159
+ // implementation(sourceSets["javaSpring3"].output)
160
+ implementation(" org.springframework.boot:spring-boot-starter-web:3.2.4" )
161
+ implementation(" io.opentelemetry:opentelemetry-sdk-extension-autoconfigure" )
162
+ implementation(project(" :instrumentation:spring:spring-web:spring-web-3.1:library" ))
163
+ implementation(project(" :instrumentation:spring:spring-webmvc:spring-webmvc-6.0:library" ))
164
+ implementation(" jakarta.servlet:jakarta.servlet-api:5.0.0" )
165
+ implementation(" org.springframework.boot:spring-boot-starter-test:3.2.4" ) {
166
+ exclude(" org.junit.vintage" , " junit-vintage-engine" )
167
+ }
168
+
169
+ // implementation("org.slf4j:slf4j-api") {
170
+ // version {
171
+ // strictly("1.7.32")
172
+ // }
173
+ // }
174
+ }
175
+ }
169
176
}
170
177
}
171
178
@@ -191,4 +198,20 @@ tasks {
191
198
jvmArgs(" --add-opens=java.base/java.lang=ALL-UNNAMED" )
192
199
jvmArgs(" -XX:+IgnoreUnrecognizedVMOptions" )
193
200
}
201
+
202
+ named<JavaCompile >(" compileJavaSpring3Java" ) {
203
+ sourceCompatibility = " 17"
204
+ targetCompatibility = " 17"
205
+ options.release.set(17 )
206
+ }
207
+
208
+ named<JavaCompile >(" compileTestSpring3Java" ) {
209
+ sourceCompatibility = " 17"
210
+ targetCompatibility = " 17"
211
+ options.release.set(17 )
212
+ }
213
+
214
+ withType(Jar ::class ) {
215
+ from(sourceSets[" javaSpring3" ].output)
216
+ }
194
217
}
0 commit comments