Переглянути джерело

Move versions to dependencyManagement (#6648)

Part of #6645
Trask Stalnaker 2 роки тому
батько
коміт
5224194740

+ 4 - 1
dependencyManagement/build.gradle.kts

@@ -111,9 +111,12 @@ val DEPENDENCIES = listOf(
   "org.objenesis:objenesis:3.2",
   "org.spockframework:spock-core:2.2-groovy-4.0",
   "org.spockframework:spock-junit4:2.2-groovy-4.0",
+  "org.spockframework:spock-spring:2.2-groovy-4.0",
   "org.scala-lang:scala-library:2.11.12",
   // Note that this is only referenced as "org.springframework.boot" in build files, not the artifact name.
-  "org.springframework.boot:spring-boot-dependencies:2.7.2"
+  "org.springframework.boot:spring-boot-dependencies:2.7.2",
+  "javax.validation:validation-api:2.0.1.Final",
+  "org.yaml:snakeyaml:1.32"
 )
 
 javaPlatform {

+ 1 - 2
instrumentation/apache-camel-2.20/javaagent/build.gradle.kts

@@ -12,7 +12,6 @@ muzzle {
 }
 
 val camelversion = "2.20.1" // first version that the tests pass on
-val versions: Map<String, String> by project
 
 dependencies {
   library("org.apache.camel:camel-core:$camelversion")
@@ -43,7 +42,7 @@ dependencies {
   testImplementation("org.springframework.boot:spring-boot-starter-test:1.5.17.RELEASE")
   testImplementation("org.springframework.boot:spring-boot-starter:1.5.17.RELEASE")
 
-  testImplementation("org.spockframework:spock-spring:${versions["org.spockframework"]}")
+  testImplementation("org.spockframework:spock-spring")
   testImplementation("javax.xml.bind:jaxb-api:2.3.1")
   testImplementation("org.elasticmq:elasticmq-rest-sqs_2.12:1.0.0")
 

+ 1 - 3
instrumentation/jms-1.1/javaagent/build.gradle.kts

@@ -26,7 +26,7 @@ tasks {
   }
 
   test {
-    usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
+    usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
     jvmArgs("-Dotel.instrumentation.messaging.experimental.receive-telemetry.enabled=true")
   }
 
@@ -35,8 +35,6 @@ tasks {
   }
 }
 
-val versions: Map<String, String> by project
-
 dependencies {
   compileOnly("com.google.auto.value:auto-value-annotations")
   annotationProcessor("com.google.auto.value:auto-value")

+ 1 - 3
instrumentation/mongo/mongo-common/testing/build.gradle.kts

@@ -2,11 +2,9 @@ plugins {
   id("otel.java-conventions")
 }
 
-val versions: Map<String, String> by project
-
 dependencies {
   api(project(":testing-common"))
-  api("org.testcontainers:mongodb:${versions["org.testcontainers"]}")
+  api("org.testcontainers:mongodb")
 
   implementation("org.apache.groovy:groovy")
   implementation("io.opentelemetry:opentelemetry-api")

+ 0 - 2
instrumentation/opentelemetry-extension-annotations-1.0/javaagent/build.gradle.kts

@@ -12,8 +12,6 @@ muzzle {
   }
 }
 
-val versions: Map<String, String> by project
-
 dependencies {
   compileOnly(project(":instrumentation-annotations-support"))
 

+ 0 - 2
instrumentation/opentelemetry-instrumentation-annotations-1.16/javaagent/build.gradle.kts

@@ -14,8 +14,6 @@ muzzle {
   }
 }
 
-val versions: Map<String, String> by project
-
 dependencies {
   compileOnly(project(":instrumentation-annotations-support"))
 

+ 1 - 1
instrumentation/spring/spring-boot-autoconfigure/build.gradle.kts

@@ -13,7 +13,7 @@ val springBootVersion = versions["org.springframework.boot"]
 dependencies {
   implementation("org.springframework.boot:spring-boot-autoconfigure:$springBootVersion")
   annotationProcessor("org.springframework.boot:spring-boot-autoconfigure-processor:$springBootVersion")
-  implementation("javax.validation:validation-api:2.0.1.Final")
+  implementation("javax.validation:validation-api")
 
   implementation(project(":instrumentation-annotations-support"))
   implementation(project(":instrumentation:kafka:kafka-clients:kafka-clients-2.6:library"))

+ 1 - 1
instrumentation/spring/spring-boot-resources/library/build.gradle.kts

@@ -9,7 +9,7 @@ dependencies {
   compileOnly("com.google.auto.service:auto-service-annotations")
   testCompileOnly("com.google.auto.service:auto-service-annotations")
 
-  implementation("org.yaml:snakeyaml:1.32")
+  implementation("org.yaml:snakeyaml")
 
   testImplementation("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi")
 }

+ 1 - 3
instrumentation/spring/spring-data-1.8/javaagent/build.gradle.kts

@@ -20,8 +20,6 @@ muzzle {
   }
 }
 
-val versions: Map<String, String> by project
-
 // DQH - API changes that impact instrumentation occurred in spring-data-commons in March 2014.
 // For now, that limits support to spring-data-commons 1.9.0 (maybe 1.8.0).
 // For testing, chose a couple spring-data modules that are old enough to work with 1.9.0.
@@ -29,7 +27,7 @@ dependencies {
   library("org.springframework.data:spring-data-commons:1.8.0.RELEASE")
   compileOnly("org.springframework:spring-aop:1.2")
 
-  testImplementation("org.spockframework:spock-spring:${versions["org.spockframework"]}")
+  testImplementation("org.spockframework:spock-spring")
   testLibrary("org.springframework:spring-test:3.0.0.RELEASE")
   testLibrary("org.springframework.data:spring-data-jpa:1.8.0.RELEASE")
 

+ 1 - 3
instrumentation/spring/spring-jms-2.0/javaagent/build.gradle.kts

@@ -19,7 +19,7 @@ testSets {
 
 tasks {
   test {
-    usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
+    usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
     jvmArgs("-Dotel.instrumentation.messaging.experimental.receive-telemetry.enabled=true")
   }
 
@@ -30,8 +30,6 @@ tasks {
   }
 }
 
-val versions: Map<String, String> by project
-
 dependencies {
   implementation(project(":instrumentation:jms-1.1:javaagent"))
   library("org.springframework:spring-jms:2.0")

+ 1 - 3
instrumentation/spring/spring-webmvc-3.1/javaagent/build.gradle.kts

@@ -17,8 +17,6 @@ muzzle {
   }
 }
 
-val versions: Map<String, String> by project
-
 dependencies {
   bootstrap(project(":instrumentation:servlet:servlet-common:bootstrap"))
 
@@ -36,7 +34,7 @@ dependencies {
   testImplementation("javax.validation:validation-api:1.1.0.Final")
   testImplementation("org.hibernate:hibernate-validator:5.4.2.Final")
 
-  testImplementation("org.spockframework:spock-spring:${versions["org.spockframework"]}")
+  testImplementation("org.spockframework:spock-spring")
 
   testLibrary("org.springframework.boot:spring-boot-starter-test:1.5.17.RELEASE")
   testLibrary("org.springframework.boot:spring-boot-starter-web:1.5.17.RELEASE")

+ 2 - 1
instrumentation/spring/starters/jaeger-spring-boot-starter/build.gradle.kts

@@ -6,9 +6,10 @@ plugins {
 group = "io.opentelemetry.instrumentation"
 
 val versions: Map<String, String> by project
+val springBootVersion = versions["org.springframework.boot"]
 
 dependencies {
-  api("org.springframework.boot:spring-boot-starter:${versions["org.springframework.boot"]}")
+  api("org.springframework.boot:spring-boot-starter:$springBootVersion")
   api(project(":instrumentation:spring:starters:spring-boot-starter"))
   api("io.opentelemetry:opentelemetry-exporter-jaeger")
 }

+ 3 - 2
instrumentation/spring/starters/spring-boot-starter/build.gradle.kts

@@ -6,10 +6,11 @@ plugins {
 group = "io.opentelemetry.instrumentation"
 
 val versions: Map<String, String> by project
+val springBootVersion = versions["org.springframework.boot"]
 
 dependencies {
-  api("org.springframework.boot:spring-boot-starter:${versions["org.springframework.boot"]}")
-  api("org.springframework.boot:spring-boot-starter-aop:${versions["org.springframework.boot"]}")
+  api("org.springframework.boot:spring-boot-starter:$springBootVersion")
+  api("org.springframework.boot:spring-boot-starter-aop:$springBootVersion")
   api(project(":instrumentation:spring:spring-boot-autoconfigure"))
   api("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi")
   api("io.opentelemetry:opentelemetry-api")

+ 2 - 1
instrumentation/spring/starters/zipkin-spring-boot-starter/build.gradle.kts

@@ -6,9 +6,10 @@ plugins {
 group = "io.opentelemetry.instrumentation"
 
 val versions: Map<String, String> by project
+val springBootVersion = versions["org.springframework.boot"]
 
 dependencies {
-  api("org.springframework.boot:spring-boot-starter:${versions["org.springframework.boot"]}")
+  api("org.springframework.boot:spring-boot-starter:$springBootVersion")
   api(project(":instrumentation:spring:starters:spring-boot-starter"))
   api("io.opentelemetry:opentelemetry-exporter-zipkin")
 }

+ 2 - 2
licenses/licenses.md

@@ -1,7 +1,7 @@
 
 #javaagent
 ##Dependency License Report
-_2022-09-09 17:28:09 PDT_
+_2022-09-18 15:10:09 PDT_
 ## Apache License, Version 2.0
 
 **1** **Group:** `com.blogspot.mydailyjava` **Name:** `weak-lock-free` **Version:** `0.18` 
@@ -194,7 +194,7 @@ _2022-09-09 17:28:09 PDT_
 > - **POM License**: Apache License, Version 2.0 - [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
 > - **POM License**: The 3-Clause BSD License - [https://opensource.org/licenses/BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause)
 
-**43** **Group:** `org.yaml` **Name:** `snakeyaml` **Version:** `1.31` 
+**43** **Group:** `org.yaml` **Name:** `snakeyaml` **Version:** `1.32` 
 > - **Manifest License**: Apache License, Version 2.0 (Not Packaged)
 > - **POM Project URL**: [https://bitbucket.org/snakeyaml/snakeyaml](https://bitbucket.org/snakeyaml/snakeyaml)
 > - **POM License**: Apache License, Version 2.0 - [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0)