Skip to content

Commit

Permalink
Use .service instead of .getService() to get testcontainersBuildServi…
Browse files Browse the repository at this point in the history
…ce (#8188)
  • Loading branch information
laurit authored Mar 31, 2023
1 parent 9e0d177 commit 5a14788
Show file tree
Hide file tree
Showing 24 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ abstract class TestcontainersBuildService : BuildService<BuildServiceParameters.
// To limit number of concurrently running resource intensive tests add
// tasks {
// test {
// usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
// usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
// }
// }
gradle.sharedServices.registerIfAbsent("testcontainersBuildService", TestcontainersBuildService::class.java) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ configurations.testRuntimeClasspath.get().resolutionStrategy.force("com.google.g

tasks {
test {
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ dependencies {

tasks {
test {
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ dependencies {

tasks {
test {
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ dependencies {
tasks {
test {
systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ dependencies {
tasks {
withType<Test>().configureEach {
systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ dependencies {

tasks {
test {
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ dependencies {

tasks {
test {
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}
2 changes: 1 addition & 1 deletion instrumentation/gwt-2.0/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ tasks {
// add test app classes to classpath
classpath = sourceSets.test.get().runtimeClasspath.plus(files("$buildDir/testapp/classes"))

usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}

Expand Down
2 changes: 1 addition & 1 deletion instrumentation/jedis/jedis-1.4/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ dependencies {

tasks {
test {
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}
2 changes: 1 addition & 1 deletion instrumentation/jedis/jedis-3.0/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ dependencies {

tasks {
test {
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}
2 changes: 1 addition & 1 deletion instrumentation/jedis/jedis-4.0/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ tasks {
test {
// latest dep test fails because peer ip is 0:0:0:0:0:0:0:1 instead of 127.0.0.1
jvmArgs("-Djava.net.preferIPv4Stack=true")
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ dependencies {
tasks.withType<Test>().configureEach {
// TODO run tests both with and without experimental span attributes
jvmArgs("-Dotel.instrumentation.lettuce.experimental-span-attributes=true")
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ dependencies {
tasks.withType<Test>().configureEach {
// TODO run tests both with and without experimental span attributes
jvmArgs("-Dotel.instrumentation.lettuce.experimental-span-attributes=true")
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ dependencies {
tasks {
test {
systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ dependencies {
tasks {
test {
systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}
2 changes: 1 addition & 1 deletion instrumentation/mongo/mongo-3.1/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ dependencies {

tasks {
test {
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}
2 changes: 1 addition & 1 deletion instrumentation/mongo/mongo-3.1/library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ dependencies {

tasks {
test {
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}
2 changes: 1 addition & 1 deletion instrumentation/mongo/mongo-3.7/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ dependencies {

tasks {
test {
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ dependencies {

tasks {
test {
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}
2 changes: 1 addition & 1 deletion instrumentation/rabbitmq-2.7/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ tasks.withType<Test>().configureEach {
jvmArgs("-Dotel.instrumentation.rabbitmq.experimental-span-attributes=true")
jvmArgs("-Dotel.instrumentation.messaging.experimental.receive-telemetry.enabled=true")

usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
2 changes: 1 addition & 1 deletion instrumentation/rediscala-1.8/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ dependencies {

tasks {
test {
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ dependencies {

tasks.test {
systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ dependencies {
tasks.withType<Test>().configureEach {
// TODO run tests both with and without experimental span attributes
jvmArgs("-Dotel.instrumentation.spymemcached.experimental-span-attributes=true")
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
}

0 comments on commit 5a14788

Please sign in to comment.