From 5a14788fc1b089bb00ebce2a9599d5ef1bcee8e6 Mon Sep 17 00:00:00 2001 From: Lauri Tulmin Date: Fri, 31 Mar 2023 11:32:24 +0300 Subject: [PATCH] Use .service instead of .getService() to get testcontainersBuildService (#8188) --- conventions/src/main/kotlin/otel.java-conventions.gradle.kts | 2 +- .../cassandra/cassandra-3.0/javaagent/build.gradle.kts | 2 +- .../cassandra/cassandra-4.0/javaagent/build.gradle.kts | 2 +- .../cassandra/cassandra-4.4/javaagent/build.gradle.kts | 2 +- .../couchbase/couchbase-3.2/javaagent/build.gradle.kts | 2 +- .../elasticsearch-rest-5.0/javaagent/build.gradle.kts | 2 +- .../elasticsearch-rest-6.4/javaagent/build.gradle.kts | 2 +- .../elasticsearch-rest-7.0/javaagent/build.gradle.kts | 2 +- instrumentation/gwt-2.0/javaagent/build.gradle.kts | 2 +- instrumentation/jedis/jedis-1.4/javaagent/build.gradle.kts | 2 +- instrumentation/jedis/jedis-3.0/javaagent/build.gradle.kts | 2 +- instrumentation/jedis/jedis-4.0/javaagent/build.gradle.kts | 2 +- instrumentation/lettuce/lettuce-4.0/javaagent/build.gradle.kts | 2 +- instrumentation/lettuce/lettuce-5.0/javaagent/build.gradle.kts | 2 +- instrumentation/lettuce/lettuce-5.1/javaagent/build.gradle.kts | 2 +- instrumentation/lettuce/lettuce-5.1/library/build.gradle.kts | 2 +- instrumentation/mongo/mongo-3.1/javaagent/build.gradle.kts | 2 +- instrumentation/mongo/mongo-3.1/library/build.gradle.kts | 2 +- instrumentation/mongo/mongo-3.7/javaagent/build.gradle.kts | 2 +- .../mongo/mongo-async-3.3/javaagent/build.gradle.kts | 2 +- instrumentation/rabbitmq-2.7/javaagent/build.gradle.kts | 2 +- instrumentation/rediscala-1.8/javaagent/build.gradle.kts | 2 +- .../redisson/redisson-3.17/javaagent/build.gradle.kts | 2 +- instrumentation/spymemcached-2.12/javaagent/build.gradle.kts | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/conventions/src/main/kotlin/otel.java-conventions.gradle.kts b/conventions/src/main/kotlin/otel.java-conventions.gradle.kts index 4a04f2e6c311..ee48d74e858c 100644 --- a/conventions/src/main/kotlin/otel.java-conventions.gradle.kts +++ b/conventions/src/main/kotlin/otel.java-conventions.gradle.kts @@ -262,7 +262,7 @@ abstract class TestcontainersBuildService : BuildService().configureEach { systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean) - usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService()) + usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service) } } diff --git a/instrumentation/elasticsearch/elasticsearch-rest-6.4/javaagent/build.gradle.kts b/instrumentation/elasticsearch/elasticsearch-rest-6.4/javaagent/build.gradle.kts index 5e0b9497b6aa..8b589b1df34c 100644 --- a/instrumentation/elasticsearch/elasticsearch-rest-6.4/javaagent/build.gradle.kts +++ b/instrumentation/elasticsearch/elasticsearch-rest-6.4/javaagent/build.gradle.kts @@ -39,6 +39,6 @@ dependencies { tasks { test { - usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService()) + usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service) } } diff --git a/instrumentation/elasticsearch/elasticsearch-rest-7.0/javaagent/build.gradle.kts b/instrumentation/elasticsearch/elasticsearch-rest-7.0/javaagent/build.gradle.kts index a55eca2bcb31..6e04bbed3905 100644 --- a/instrumentation/elasticsearch/elasticsearch-rest-7.0/javaagent/build.gradle.kts +++ b/instrumentation/elasticsearch/elasticsearch-rest-7.0/javaagent/build.gradle.kts @@ -36,6 +36,6 @@ dependencies { tasks { test { - usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService()) + usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service) } } diff --git a/instrumentation/gwt-2.0/javaagent/build.gradle.kts b/instrumentation/gwt-2.0/javaagent/build.gradle.kts index 5a5c953816b0..e7fc071cea30 100644 --- a/instrumentation/gwt-2.0/javaagent/build.gradle.kts +++ b/instrumentation/gwt-2.0/javaagent/build.gradle.kts @@ -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) } } diff --git a/instrumentation/jedis/jedis-1.4/javaagent/build.gradle.kts b/instrumentation/jedis/jedis-1.4/javaagent/build.gradle.kts index 2e9c14a883ce..2e446ca8b53a 100644 --- a/instrumentation/jedis/jedis-1.4/javaagent/build.gradle.kts +++ b/instrumentation/jedis/jedis-1.4/javaagent/build.gradle.kts @@ -27,6 +27,6 @@ dependencies { tasks { test { - usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService()) + usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service) } } diff --git a/instrumentation/jedis/jedis-3.0/javaagent/build.gradle.kts b/instrumentation/jedis/jedis-3.0/javaagent/build.gradle.kts index 3a137acf13fd..2a11c52f2268 100644 --- a/instrumentation/jedis/jedis-3.0/javaagent/build.gradle.kts +++ b/instrumentation/jedis/jedis-3.0/javaagent/build.gradle.kts @@ -30,6 +30,6 @@ dependencies { tasks { test { - usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService()) + usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service) } } diff --git a/instrumentation/jedis/jedis-4.0/javaagent/build.gradle.kts b/instrumentation/jedis/jedis-4.0/javaagent/build.gradle.kts index a70f9ed20404..d6127aa061e8 100644 --- a/instrumentation/jedis/jedis-4.0/javaagent/build.gradle.kts +++ b/instrumentation/jedis/jedis-4.0/javaagent/build.gradle.kts @@ -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) } } diff --git a/instrumentation/lettuce/lettuce-4.0/javaagent/build.gradle.kts b/instrumentation/lettuce/lettuce-4.0/javaagent/build.gradle.kts index 34a4d1ff7b22..5fbe28c84de7 100644 --- a/instrumentation/lettuce/lettuce-4.0/javaagent/build.gradle.kts +++ b/instrumentation/lettuce/lettuce-4.0/javaagent/build.gradle.kts @@ -20,5 +20,5 @@ dependencies { tasks.withType().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) } diff --git a/instrumentation/lettuce/lettuce-5.0/javaagent/build.gradle.kts b/instrumentation/lettuce/lettuce-5.0/javaagent/build.gradle.kts index 740295761b0c..a3c49e15b398 100644 --- a/instrumentation/lettuce/lettuce-5.0/javaagent/build.gradle.kts +++ b/instrumentation/lettuce/lettuce-5.0/javaagent/build.gradle.kts @@ -25,5 +25,5 @@ dependencies { tasks.withType().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) } diff --git a/instrumentation/lettuce/lettuce-5.1/javaagent/build.gradle.kts b/instrumentation/lettuce/lettuce-5.1/javaagent/build.gradle.kts index 0f5277dcb2bc..d09af4df3a39 100644 --- a/instrumentation/lettuce/lettuce-5.1/javaagent/build.gradle.kts +++ b/instrumentation/lettuce/lettuce-5.1/javaagent/build.gradle.kts @@ -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) } } diff --git a/instrumentation/lettuce/lettuce-5.1/library/build.gradle.kts b/instrumentation/lettuce/lettuce-5.1/library/build.gradle.kts index 716295f4e574..f4e825b1d015 100644 --- a/instrumentation/lettuce/lettuce-5.1/library/build.gradle.kts +++ b/instrumentation/lettuce/lettuce-5.1/library/build.gradle.kts @@ -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) } } diff --git a/instrumentation/mongo/mongo-3.1/javaagent/build.gradle.kts b/instrumentation/mongo/mongo-3.1/javaagent/build.gradle.kts index c9c34ddf5528..bdc5193e6396 100644 --- a/instrumentation/mongo/mongo-3.1/javaagent/build.gradle.kts +++ b/instrumentation/mongo/mongo-3.1/javaagent/build.gradle.kts @@ -25,6 +25,6 @@ dependencies { tasks { test { - usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService()) + usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service) } } diff --git a/instrumentation/mongo/mongo-3.1/library/build.gradle.kts b/instrumentation/mongo/mongo-3.1/library/build.gradle.kts index fb74fb335060..1504784c794e 100644 --- a/instrumentation/mongo/mongo-3.1/library/build.gradle.kts +++ b/instrumentation/mongo/mongo-3.1/library/build.gradle.kts @@ -14,6 +14,6 @@ dependencies { tasks { test { - usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService()) + usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service) } } diff --git a/instrumentation/mongo/mongo-3.7/javaagent/build.gradle.kts b/instrumentation/mongo/mongo-3.7/javaagent/build.gradle.kts index 02d144c4fd73..3122750cc2a6 100644 --- a/instrumentation/mongo/mongo-3.7/javaagent/build.gradle.kts +++ b/instrumentation/mongo/mongo-3.7/javaagent/build.gradle.kts @@ -35,6 +35,6 @@ dependencies { tasks { test { - usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService()) + usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service) } } diff --git a/instrumentation/mongo/mongo-async-3.3/javaagent/build.gradle.kts b/instrumentation/mongo/mongo-async-3.3/javaagent/build.gradle.kts index 60fdd4557cc2..00d4e4ec237b 100644 --- a/instrumentation/mongo/mongo-async-3.3/javaagent/build.gradle.kts +++ b/instrumentation/mongo/mongo-async-3.3/javaagent/build.gradle.kts @@ -26,6 +26,6 @@ dependencies { tasks { test { - usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService()) + usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service) } } diff --git a/instrumentation/rabbitmq-2.7/javaagent/build.gradle.kts b/instrumentation/rabbitmq-2.7/javaagent/build.gradle.kts index a20f7dc2f59d..92ac9c194e1d 100644 --- a/instrumentation/rabbitmq-2.7/javaagent/build.gradle.kts +++ b/instrumentation/rabbitmq-2.7/javaagent/build.gradle.kts @@ -34,5 +34,5 @@ tasks.withType().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) } diff --git a/instrumentation/rediscala-1.8/javaagent/build.gradle.kts b/instrumentation/rediscala-1.8/javaagent/build.gradle.kts index a1bc43f5d9a5..bd73085bfe16 100644 --- a/instrumentation/rediscala-1.8/javaagent/build.gradle.kts +++ b/instrumentation/rediscala-1.8/javaagent/build.gradle.kts @@ -54,7 +54,7 @@ dependencies { tasks { test { - usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService()) + usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service) } } diff --git a/instrumentation/redisson/redisson-3.17/javaagent/build.gradle.kts b/instrumentation/redisson/redisson-3.17/javaagent/build.gradle.kts index f3f50e716781..a37e1e87a96e 100644 --- a/instrumentation/redisson/redisson-3.17/javaagent/build.gradle.kts +++ b/instrumentation/redisson/redisson-3.17/javaagent/build.gradle.kts @@ -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) } diff --git a/instrumentation/spymemcached-2.12/javaagent/build.gradle.kts b/instrumentation/spymemcached-2.12/javaagent/build.gradle.kts index b23f354cad87..3618eb930772 100644 --- a/instrumentation/spymemcached-2.12/javaagent/build.gradle.kts +++ b/instrumentation/spymemcached-2.12/javaagent/build.gradle.kts @@ -23,5 +23,5 @@ dependencies { tasks.withType().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) }