diff --git a/dependencies.gradle b/dependencies.gradle index 987fb03405..bfae438742 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -31,11 +31,6 @@ def VERSIONS = [ libs.grpcTestingProto, libs.grpcKotlinStub, libs.gmetric4j, - libs.prometheusMetrics, - libs.prometheusMetricsExpositionFormats, - libs.prometheusMetricsTracerCommon, - libs.prometheusSimpleClient, - libs.prometheusSimpleClientPushgateway, libs.restAssured, libs.retrofit2, libs.jakarta.jmsApi, @@ -67,8 +62,6 @@ def VERSIONS = [ libs.hibernateEntitymanager, libs.hsqldb, libs.jsr107, - libs.junitJupiter, - libs.junitPlatformLauncher, libs.latencyUtils, libs.mongoSync, libs.postgre, @@ -87,7 +80,9 @@ def VERSIONS = [ def PLATFORM_BOMS = [ libs.reactorBom, libs.nettyBom, - libs.junitBom + libs.junitBom, + libs.prometheusMetricsBom, + libs.prometheusSimpleClientBom ] subprojects { diff --git a/docs/build.gradle b/docs/build.gradle index e6764d99fd..1222e9864f 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -29,7 +29,7 @@ dependencies { testImplementation project(':micrometer-test') testImplementation project(':micrometer-observation-test') testImplementation 'org.aspectj:aspectjweaver' - testImplementation 'org.junit.jupiter:junit-jupiter' + testImplementation libs.junitJupiter testImplementation 'org.assertj:assertj-core' testImplementation 'org.springframework:spring-context' testImplementation 'io.projectreactor:reactor-core' diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 595ee4c299..4138fe20da 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -52,7 +52,6 @@ jooqNew = "3.19.8" jsr107 = "1.1.1" jsr305 = "3.0.2" junit = "5.10.3" -junit-platform = "1.10.3" kafka = "2.8.2" kafka-junit = "4.2.10" latency-utils = "2.0.3" @@ -162,9 +161,9 @@ jsonPath = { module = "com.jayway.jsonpath:json-path", version = "2.9.0" } jsr107 = { module = "org.jsr107.ri:cache-ri-impl", version.ref = "jsr107" } jsr305 = { module = "com.google.code.findbugs:jsr305", version.ref = "jsr305" } junitBom = { module = "org.junit:junit-bom", version.ref = "junit" } -junitJupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" } +junitJupiter = { module = "org.junit.jupiter:junit-jupiter" } junitLoggingExtension = "com.innoq:junit5-logging-extension:0.2.0" -junitPlatformLauncher = { module = "org.junit.platform:junit-platform-launcher", version.ref = "junit-platform" } +junitPlatformLauncher = { module = "org.junit.platform:junit-platform-launcher" } kafkaClients = { module = "org.apache.kafka:kafka-clients", version.ref = "kafka" } kafkaStreams = { module = "org.apache.kafka:kafka-streams", version.ref = "kafka" } kafkaJunit = { module = "com.github.charithe:kafka-junit", version.ref = "kafka-junit" } @@ -187,11 +186,13 @@ okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" } openTelemetry-proto = { module = "io.opentelemetry.proto:opentelemetry-proto", version = "1.2.0-alpha" } osgiJunit5 = "org.osgi:org.osgi.test.junit5:1.3.0" postgre = { module = "org.postgresql:postgresql", version.ref = "postgre" } -prometheusMetrics = { module = "io.prometheus:prometheus-metrics-core", version.ref = "prometheus" } -prometheusMetricsExpositionFormats = { module = "io.prometheus:prometheus-metrics-exposition-formats", version.ref = "prometheus" } -prometheusMetricsTracerCommon = { module = "io.prometheus:prometheus-metrics-tracer-common", version.ref = "prometheus" } -prometheusSimpleClient = { module = "io.prometheus:simpleclient_common", version.ref = "prometheusSimpleClient" } -prometheusSimpleClientPushgateway = { module = "io.prometheus:simpleclient_pushgateway", version.ref = "prometheusSimpleClient" } +prometheusMetricsBom = { module = "io.prometheus:prometheus-metrics-bom", version.ref = "prometheus" } +prometheusMetrics = { module = "io.prometheus:prometheus-metrics-core" } +prometheusMetricsExpositionFormats = { module = "io.prometheus:prometheus-metrics-exposition-formats" } +prometheusMetricsTracerCommon = { module = "io.prometheus:prometheus-metrics-tracer-common" } +prometheusSimpleClientBom = { module = "io.prometheus:simpleclient_bom", version.ref = "prometheusSimpleClient" } +prometheusSimpleClient = { module = "io.prometheus:simpleclient_common" } +prometheusSimpleClientPushgateway = { module = "io.prometheus:simpleclient_pushgateway" } reactorBom = { module = "io.projectreactor:reactor-bom", version.ref = "reactor" } restAssured = { module = "io.rest-assured:rest-assured", version.ref = "rest-assured" } retrofit2 = { module = "com.squareup.retrofit2:retrofit", version = "2.11.0" } diff --git a/implementations/micrometer-registry-prometheus-simpleclient/build.gradle b/implementations/micrometer-registry-prometheus-simpleclient/build.gradle index 934a1aeda0..a535febef0 100644 --- a/implementations/micrometer-registry-prometheus-simpleclient/build.gradle +++ b/implementations/micrometer-registry-prometheus-simpleclient/build.gradle @@ -3,7 +3,7 @@ description = 'MeterRegistry implementation for Prometheus using io.prometheus:s dependencies { api project(':micrometer-core') - api 'io.prometheus:simpleclient_common' + api libs.prometheusSimpleClient testImplementation project(':micrometer-test') } diff --git a/implementations/micrometer-registry-prometheus/build.gradle b/implementations/micrometer-registry-prometheus/build.gradle index 16ce4fa98c..6b2eeb4cee 100644 --- a/implementations/micrometer-registry-prometheus/build.gradle +++ b/implementations/micrometer-registry-prometheus/build.gradle @@ -3,16 +3,15 @@ description = 'MeterRegistry implementation for Prometheus using io.prometheus:p dependencies { api project(':micrometer-core') - api('io.prometheus:prometheus-metrics-core') { + api(libs.prometheusMetrics) { // We only need SpanContext from prometheus-metrics-tracer-common, we don't need // prometheus-metrics-tracer-initializer nor the dependencies it pulls in exclude(group: 'io.prometheus', module: 'prometheus-metrics-tracer-initializer') } - api 'io.prometheus:prometheus-metrics-tracer-common' - implementation 'io.prometheus:prometheus-metrics-exposition-formats' + api libs.prometheusMetricsTracerCommon + implementation libs.prometheusMetricsExpositionFormats testImplementation project(':micrometer-test') - testImplementation 'io.prometheus:prometheus-metrics-tracer-common' testImplementation 'io.rest-assured:rest-assured' testImplementation 'org.testcontainers:junit-jupiter' testImplementation 'org.awaitility:awaitility' diff --git a/micrometer-commons/build.gradle b/micrometer-commons/build.gradle index ecd68ba7a6..230e685475 100644 --- a/micrometer-commons/build.gradle +++ b/micrometer-commons/build.gradle @@ -8,7 +8,7 @@ dependencies { optionalApi 'org.aspectj:aspectjweaver' // JUnit 5 - testImplementation 'org.junit.jupiter:junit-jupiter' + testImplementation libs.junitJupiter testImplementation 'org.assertj:assertj-core' } diff --git a/micrometer-core/build.gradle b/micrometer-core/build.gradle index dc883a4c22..7cdf45f0ef 100644 --- a/micrometer-core/build.gradle +++ b/micrometer-core/build.gradle @@ -149,7 +149,7 @@ dependencies { // testAnnotationProcessor 'com.google.dagger:dagger-compiler' // JUnit 5 - testImplementation 'org.junit.jupiter:junit-jupiter' + testImplementation libs.junitJupiter testImplementation(libs.archunitJunit5) { // avoid transitively pulling in slf4j 2 exclude group: "org.slf4j", module: "slf4j-api" @@ -196,7 +196,7 @@ dependencies { // Dependencies for @ClassPathExclusions testImplementation("org.junit.platform:junit-platform-engine") - testImplementation("org.junit.platform:junit-platform-launcher") + testImplementation(libs.junitPlatformLauncher) testImplementation(libs.mavenResolverConnectorBasic) testImplementation(libs.mavenResolverProvider) { exclude(group: "javax.inject", module: "javax.inject") diff --git a/micrometer-jakarta9/build.gradle b/micrometer-jakarta9/build.gradle index beedac5e49..6a27d8093d 100644 --- a/micrometer-jakarta9/build.gradle +++ b/micrometer-jakarta9/build.gradle @@ -19,7 +19,7 @@ dependencies { optionalApi 'jakarta.jms:jakarta.jms-api' - testImplementation 'org.junit.jupiter:junit-jupiter' + testImplementation libs.junitJupiter testImplementation(libs.archunitJunit5) { // avoid transitively pulling in slf4j 2 exclude group: "org.slf4j", module: "slf4j-api" diff --git a/micrometer-jetty11/build.gradle b/micrometer-jetty11/build.gradle index 55aba97a62..c3da3c34dc 100644 --- a/micrometer-jetty11/build.gradle +++ b/micrometer-jetty11/build.gradle @@ -4,7 +4,7 @@ dependencies { api project(":micrometer-core") api libs.jetty11Server - testImplementation 'org.junit.jupiter:junit-jupiter' + testImplementation libs.junitJupiter testImplementation 'org.assertj:assertj-core' } diff --git a/micrometer-observation-test/build.gradle b/micrometer-observation-test/build.gradle index 5f553df1dd..5f612d334a 100644 --- a/micrometer-observation-test/build.gradle +++ b/micrometer-observation-test/build.gradle @@ -4,7 +4,7 @@ dependencies { api project(':micrometer-observation') api 'org.assertj:assertj-core' - api 'org.junit.jupiter:junit-jupiter' + api libs.junitJupiter implementation libs.mockitoCore4 diff --git a/micrometer-observation/build.gradle b/micrometer-observation/build.gradle index 972a124084..d707d22664 100644 --- a/micrometer-observation/build.gradle +++ b/micrometer-observation/build.gradle @@ -32,7 +32,7 @@ dependencies { testImplementation 'org.springframework:spring-context' // JUnit 5 - testImplementation 'org.junit.jupiter:junit-jupiter' + testImplementation libs.junitJupiter testImplementation(libs.archunitJunit5) { // avoid transitively pulling in slf4j 2 exclude group: "org.slf4j", module: "slf4j-api" diff --git a/micrometer-osgi-test/build.gradle b/micrometer-osgi-test/build.gradle index 625e78abfc..d6ffd9152b 100644 --- a/micrometer-osgi-test/build.gradle +++ b/micrometer-osgi-test/build.gradle @@ -4,7 +4,7 @@ import aQute.bnd.gradle.TestOSGi dependencies { testImplementation 'org.assertj:assertj-core' - testImplementation 'org.junit.jupiter:junit-jupiter' + testImplementation libs.junitJupiter testImplementation libs.osgiJunit5 testImplementation 'org.slf4j:slf4j-api' @@ -17,7 +17,7 @@ dependencies { testImplementation libs.felixFramework - testRuntimeOnly 'org.junit.platform:junit-platform-launcher' + testRuntimeOnly libs.junitPlatformLauncher testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' testRuntimeOnly libs.felixScr testRuntimeOnly libs.slfj4Simple diff --git a/micrometer-test/build.gradle b/micrometer-test/build.gradle index 32514a6a16..0b10b6f49c 100644 --- a/micrometer-test/build.gradle +++ b/micrometer-test/build.gradle @@ -36,7 +36,7 @@ dependencies { api 'org.assertj:assertj-core' - api 'org.junit.jupiter:junit-jupiter' + api libs.junitJupiter api 'org.junit.jupiter:junit-jupiter-engine' api 'ru.lanwen.wiremock:wiremock-junit5' diff --git a/samples/micrometer-samples-core/build.gradle b/samples/micrometer-samples-core/build.gradle index b88b18207a..07edfe52e9 100644 --- a/samples/micrometer-samples-core/build.gradle +++ b/samples/micrometer-samples-core/build.gradle @@ -15,7 +15,7 @@ dependencies { implementation project(":micrometer-registry-$sys") } - implementation 'io.prometheus:simpleclient_pushgateway' + implementation libs.prometheusSimpleClientPushgateway implementation 'io.projectreactor.netty:reactor-netty-http' implementation 'org.apache.kafka:kafka-clients' implementation 'com.github.charithe:kafka-junit' diff --git a/samples/micrometer-samples-jersey3/build.gradle b/samples/micrometer-samples-jersey3/build.gradle index 7adc0c165c..b0068a6c6e 100644 --- a/samples/micrometer-samples-jersey3/build.gradle +++ b/samples/micrometer-samples-jersey3/build.gradle @@ -21,6 +21,6 @@ dependencies { runtimeOnly libs.jersey3Hk2 testImplementation libs.jersey3TestFrameworkJdkHttp - testImplementation 'org.junit.jupiter:junit-jupiter' + testImplementation libs.junitJupiter testImplementation 'org.assertj:assertj-core' }