From a5e51a37f70d9e0a6edcd17b311455b51d566bb5 Mon Sep 17 00:00:00 2001 From: David Venable Date: Thu, 9 Feb 2023 13:49:11 -0600 Subject: [PATCH] Use the Gradle version catalog for common software versions to the extent that it can replace the versionMap. (#2253) Signed-off-by: David Venable --- build-resources.gradle | 12 -------- build.gradle | 8 ++--- data-prepper-core/build.gradle | 6 ++-- .../build.gradle | 2 +- .../aggregate-processor/build.gradle | 4 +-- .../armeria-common/build.gradle | 6 ++-- data-prepper-plugins/common/build.gradle | 2 +- .../grok-processor/build.gradle | 2 +- data-prepper-plugins/http-source/build.gradle | 2 +- data-prepper-plugins/opensearch/build.gradle | 2 +- .../otel-logs-source/build.gradle | 4 +-- .../otel-metrics-raw-processor/build.gradle | 10 +++---- .../otel-metrics-source/build.gradle | 10 +++---- .../otel-proto-common/build.gradle | 4 +-- .../otel-trace-group-processor/build.gradle | 2 +- .../otel-trace-raw-processor/build.gradle | 10 +++---- .../otel-trace-source/build.gradle | 10 +++---- .../peer-forwarder/build.gradle | 4 +-- .../service-map-stateful/build.gradle | 6 ++-- e2e-test/build.gradle | 2 +- e2e-test/log/build.gradle | 6 ++-- e2e-test/peerforwarder/build.gradle | 12 ++++---- e2e-test/trace/build.gradle | 10 +++---- settings.gradle | 30 +++++++++++++++++++ 24 files changed, 90 insertions(+), 76 deletions(-) diff --git a/build-resources.gradle b/build-resources.gradle index b3652d15f5..9a78bd413b 100644 --- a/build-resources.gradle +++ b/build-resources.gradle @@ -3,18 +3,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -//preferably try to maintain the alphabetical order -ext.versionMap = [ - junitJupiter : '5.8.2', - mockito : '3.11.2', - opentelemetryProto : '0.16.0-alpha', - opensearchVersion : '1.3.7', - armeria: '1.20.3', - armeriaGrpc: '1.20.3', - protobufJavaUtil: '3.21.11', - protobufJava: '3.21.11' -] - ext.coreProjects = [ project(':data-prepper-api'), project(':data-prepper-core'), diff --git a/build.gradle b/build.gradle index 3eb8afe19e..896353d881 100644 --- a/build.gradle +++ b/build.gradle @@ -85,12 +85,8 @@ subprojects { implementation platform('io.micrometer:micrometer-bom:1.9.4') implementation 'com.google.guava:guava:31.1-jre' implementation 'org.slf4j:slf4j-api:2.0.5' - testImplementation platform("org.junit:junit-bom:${versionMap.junitJupiter}") - testImplementation 'org.junit.jupiter:junit-jupiter' - testImplementation 'org.junit.vintage:junit-vintage-engine' - testImplementation "org.mockito:mockito-core:${versionMap.mockito}" - testImplementation "org.mockito:mockito-junit-jupiter:${versionMap.mockito}" - + testImplementation testLibs.bundles.junit + testImplementation testLibs.bundles.mockito testImplementation 'org.hamcrest:hamcrest:2.2' testImplementation 'org.awaitility:awaitility:4.2.0' constraints { diff --git a/data-prepper-core/build.gradle b/data-prepper-core/build.gradle index 5837802755..7b22e46054 100644 --- a/data-prepper-core/build.gradle +++ b/data-prepper-core/build.gradle @@ -39,16 +39,16 @@ dependencies { } implementation 'software.amazon.cloudwatchlogs:aws-embedded-metrics:2.0.0-beta-1' testImplementation 'org.springframework:spring-test:5.3.25' - implementation "com.linecorp.armeria:armeria:${versionMap.armeria}" + implementation libs.armeria.core + implementation libs.armeria.grpc implementation 'org.apache.commons:commons-lang3:3.12.0' - implementation "com.linecorp.armeria:armeria-grpc:${versionMap.armeriaGrpc}" implementation 'software.amazon.awssdk:acm' implementation 'software.amazon.awssdk:s3' implementation 'software.amazon.awssdk:apache-client' implementation 'commons-validator:commons-validator:1.7' implementation 'software.amazon.awssdk:servicediscovery' implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310' - testImplementation "org.mockito:mockito-inline:${versionMap.mockito}" + testImplementation testLibs.mockito.inline testImplementation 'org.apache.commons:commons-lang3:3.12.0' testImplementation project(':data-prepper-api').sourceSets.test.output } diff --git a/data-prepper-logstash-configuration/build.gradle b/data-prepper-logstash-configuration/build.gradle index 8a9445fac8..433a24edb6 100644 --- a/data-prepper-logstash-configuration/build.gradle +++ b/data-prepper-logstash-configuration/build.gradle @@ -22,7 +22,7 @@ dependencies { implementation 'com.fasterxml.jackson.core:jackson-databind' implementation "org.apache.commons:commons-lang3:3.12.0" testImplementation 'org.slf4j:slf4j-simple:2.0.5' - testImplementation "org.mockito:mockito-inline:${versionMap.mockito}" + testImplementation testLibs.mockito.inline } generateGrammarSource { diff --git a/data-prepper-plugins/aggregate-processor/build.gradle b/data-prepper-plugins/aggregate-processor/build.gradle index 8507e01464..3384a68efc 100644 --- a/data-prepper-plugins/aggregate-processor/build.gradle +++ b/data-prepper-plugins/aggregate-processor/build.gradle @@ -16,10 +16,10 @@ dependencies { implementation project(':data-prepper-plugins:otel-metrics-raw-processor') implementation 'com.google.guava:guava:23.0' implementation "org.apache.commons:commons-lang3:3.12.0" - implementation "io.opentelemetry.proto:opentelemetry-proto:${versionMap.opentelemetryProto}" + implementation libs.opentelemetry.proto implementation 'com.fasterxml.jackson.core:jackson-databind' implementation 'io.micrometer:micrometer-core' - testImplementation "org.mockito:mockito-inline:${versionMap.mockito}" + testImplementation testLibs.mockito.inline } jacocoTestCoverageVerification { diff --git a/data-prepper-plugins/armeria-common/build.gradle b/data-prepper-plugins/armeria-common/build.gradle index 62a8379031..ea14c988d1 100644 --- a/data-prepper-plugins/armeria-common/build.gradle +++ b/data-prepper-plugins/armeria-common/build.gradle @@ -6,7 +6,7 @@ dependencies { implementation project(':data-prepper-api') - implementation "com.linecorp.armeria:armeria:${versionMap.armeria}" - implementation "com.linecorp.armeria:armeria-grpc:${versionMap.armeriaGrpc}" - testImplementation "com.linecorp.armeria:armeria-junit5:${versionMap.armeria}" + implementation libs.armeria.core + implementation libs.armeria.grpc + testImplementation libs.armeria.junit } diff --git a/data-prepper-plugins/common/build.gradle b/data-prepper-plugins/common/build.gradle index e10dbffa60..3f24aa32dd 100644 --- a/data-prepper-plugins/common/build.gradle +++ b/data-prepper-plugins/common/build.gradle @@ -20,7 +20,7 @@ dependencies { implementation 'io.micrometer:micrometer-core' testImplementation project(':data-prepper-plugins:blocking-buffer') testImplementation 'commons-io:commons-io:2.11.0' - testImplementation "org.mockito:mockito-inline:${versionMap.mockito}" + testImplementation testLibs.mockito.inline } jacocoTestCoverageVerification { diff --git a/data-prepper-plugins/grok-processor/build.gradle b/data-prepper-plugins/grok-processor/build.gradle index d3ed2d7280..82a8306a5d 100644 --- a/data-prepper-plugins/grok-processor/build.gradle +++ b/data-prepper-plugins/grok-processor/build.gradle @@ -12,7 +12,7 @@ dependencies { implementation 'com.fasterxml.jackson.core:jackson-databind' implementation "io.krakens:java-grok:0.1.9" implementation 'io.micrometer:micrometer-core' - testImplementation "org.mockito:mockito-inline:${versionMap.mockito}" + testImplementation testLibs.mockito.inline testImplementation project(':data-prepper-test-common') } diff --git a/data-prepper-plugins/http-source/build.gradle b/data-prepper-plugins/http-source/build.gradle index 565283e014..3d39473e08 100644 --- a/data-prepper-plugins/http-source/build.gradle +++ b/data-prepper-plugins/http-source/build.gradle @@ -12,7 +12,7 @@ dependencies { implementation project(':data-prepper-plugins:blocking-buffer') implementation project(':data-prepper-plugins:common') implementation project(':data-prepper-plugins:armeria-common') - implementation "com.linecorp.armeria:armeria:${versionMap.armeria}" + implementation libs.armeria.core implementation 'commons-io:commons-io:2.11.0' implementation 'software.amazon.awssdk:acm' implementation 'software.amazon.awssdk:s3' diff --git a/data-prepper-plugins/opensearch/build.gradle b/data-prepper-plugins/opensearch/build.gradle index 81d186bd30..5ae25a0281 100644 --- a/data-prepper-plugins/opensearch/build.gradle +++ b/data-prepper-plugins/opensearch/build.gradle @@ -5,7 +5,7 @@ buildscript { ext { - opensearchVersion = System.getProperty('opensearch.version', "${versionMap.opensearchVersion}") + opensearchVersion = System.getProperty('opensearch.version', "${libs.versions.opensearch.get()}") } repositories { diff --git a/data-prepper-plugins/otel-logs-source/build.gradle b/data-prepper-plugins/otel-logs-source/build.gradle index f4b3f3c4e7..87fc628b63 100644 --- a/data-prepper-plugins/otel-logs-source/build.gradle +++ b/data-prepper-plugins/otel-logs-source/build.gradle @@ -15,7 +15,7 @@ dependencies { implementation 'commons-codec:commons-codec:1.15' implementation project(':data-prepper-plugins:armeria-common') testImplementation project(':data-prepper-api').sourceSets.test.output - implementation "io.opentelemetry.proto:opentelemetry-proto:${versionMap.opentelemetryProto}" + implementation libs.opentelemetry.proto implementation "commons-io:commons-io:2.11.0" implementation 'software.amazon.awssdk:acm' implementation 'software.amazon.awssdk:auth' @@ -30,7 +30,7 @@ dependencies { implementation "org.bouncycastle:bcprov-jdk15on:1.69" implementation "org.bouncycastle:bcpkix-jdk15on:1.69" testImplementation 'org.assertj:assertj-core:3.21.0' - testImplementation "org.mockito:mockito-inline:${versionMap.mockito}" + testImplementation testLibs.mockito.inline testImplementation "org.hamcrest:hamcrest:2.2" testImplementation("commons-io:commons-io:2.10.0") } diff --git a/data-prepper-plugins/otel-metrics-raw-processor/build.gradle b/data-prepper-plugins/otel-metrics-raw-processor/build.gradle index ac813556b3..2dc34951bd 100644 --- a/data-prepper-plugins/otel-metrics-raw-processor/build.gradle +++ b/data-prepper-plugins/otel-metrics-raw-processor/build.gradle @@ -14,15 +14,15 @@ dependencies { implementation 'commons-codec:commons-codec:1.15' implementation 'org.apache.commons:commons-lang3:3.12.0' testImplementation project(':data-prepper-api').sourceSets.test.output - implementation "io.opentelemetry.proto:opentelemetry-proto:${versionMap.opentelemetryProto}" - implementation "com.google.protobuf:protobuf-java-util:${versionMap.protobufJavaUtil}" - implementation "com.linecorp.armeria:armeria:${versionMap.armeria}" - implementation "com.linecorp.armeria:armeria-grpc:${versionMap.armeriaGrpc}" + implementation libs.opentelemetry.proto + implementation libs.protobuf.util + implementation libs.armeria.core + implementation libs.armeria.grpc implementation 'com.fasterxml.jackson.core:jackson-databind' implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml' implementation group: 'com.google.guava', name: 'guava', version: '31.1-jre' testImplementation 'org.assertj:assertj-core:3.24.2' - testImplementation "org.mockito:mockito-inline:${versionMap.mockito}" + testImplementation testLibs.mockito.inline } jacocoTestCoverageVerification { diff --git a/data-prepper-plugins/otel-metrics-source/build.gradle b/data-prepper-plugins/otel-metrics-source/build.gradle index ae65dc3429..0a5bb24e0e 100644 --- a/data-prepper-plugins/otel-metrics-source/build.gradle +++ b/data-prepper-plugins/otel-metrics-source/build.gradle @@ -14,22 +14,22 @@ dependencies { implementation 'commons-codec:commons-codec:1.15' implementation project(':data-prepper-plugins:armeria-common') testImplementation project(':data-prepper-api').sourceSets.test.output - implementation "io.opentelemetry.proto:opentelemetry-proto:${versionMap.opentelemetryProto}" + implementation libs.opentelemetry.proto implementation "commons-io:commons-io:2.11.0" implementation 'software.amazon.awssdk:acm' implementation 'software.amazon.awssdk:auth' implementation 'software.amazon.awssdk:regions' implementation 'software.amazon.awssdk:s3' - implementation "com.google.protobuf:protobuf-java-util:${versionMap.protobufJavaUtil}" - implementation "com.linecorp.armeria:armeria:${versionMap.armeria}" - implementation "com.linecorp.armeria:armeria-grpc:${versionMap.armeriaGrpc}" + implementation libs.protobuf.util + implementation libs.armeria.core + implementation libs.armeria.grpc implementation 'com.fasterxml.jackson.core:jackson-databind' implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml' implementation "org.apache.commons:commons-lang3:3.12.0" implementation "org.bouncycastle:bcprov-jdk15on:1.70" implementation "org.bouncycastle:bcpkix-jdk15on:1.70" testImplementation 'org.assertj:assertj-core:3.24.2' - testImplementation "org.mockito:mockito-inline:${versionMap.mockito}" + testImplementation testLibs.mockito.inline testImplementation("commons-io:commons-io:2.10.0") } diff --git a/data-prepper-plugins/otel-proto-common/build.gradle b/data-prepper-plugins/otel-proto-common/build.gradle index 75ba3ad2fb..dcf2bfd2a9 100644 --- a/data-prepper-plugins/otel-proto-common/build.gradle +++ b/data-prepper-plugins/otel-proto-common/build.gradle @@ -9,8 +9,8 @@ plugins { dependencies { implementation project(':data-prepper-api') - implementation "io.opentelemetry.proto:opentelemetry-proto:${versionMap.opentelemetryProto}" - implementation "com.google.protobuf:protobuf-java-util:${versionMap.protobufJavaUtil}" + implementation libs.opentelemetry.proto + implementation libs.protobuf.util implementation 'com.fasterxml.jackson.core:jackson-databind' implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml' implementation "org.apache.commons:commons-lang3:3.12.0" diff --git a/data-prepper-plugins/otel-trace-group-processor/build.gradle b/data-prepper-plugins/otel-trace-group-processor/build.gradle index 551d0d359e..a3537d1f1f 100644 --- a/data-prepper-plugins/otel-trace-group-processor/build.gradle +++ b/data-prepper-plugins/otel-trace-group-processor/build.gradle @@ -8,7 +8,7 @@ plugins { } ext { - opensearchVersion = System.getProperty("opensearch.version", "${versionMap.opensearchVersion}") + opensearchVersion = System.getProperty("opensearch.version", "${libs.versions.opensearch.get()}") } dependencies { diff --git a/data-prepper-plugins/otel-trace-raw-processor/build.gradle b/data-prepper-plugins/otel-trace-raw-processor/build.gradle index 0fe551ff45..abeca6c40c 100644 --- a/data-prepper-plugins/otel-trace-raw-processor/build.gradle +++ b/data-prepper-plugins/otel-trace-raw-processor/build.gradle @@ -12,15 +12,15 @@ dependencies { implementation project(':data-prepper-plugins:common') implementation 'commons-codec:commons-codec:1.15' testImplementation project(':data-prepper-api').sourceSets.test.output - implementation "io.opentelemetry.proto:opentelemetry-proto:${versionMap.opentelemetryProto}" - implementation "com.google.protobuf:protobuf-java-util:${versionMap.protobufJavaUtil}" - implementation "com.linecorp.armeria:armeria:${versionMap.armeria}" - implementation "com.linecorp.armeria:armeria-grpc:${versionMap.armeriaGrpc}" + implementation libs.opentelemetry.proto + implementation libs.protobuf.util + implementation libs.armeria.core + implementation libs.armeria.grpc implementation 'com.fasterxml.jackson.core:jackson-databind' implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml' implementation 'com.google.guava:guava:31.1-jre' testImplementation 'org.assertj:assertj-core:3.24.2' - testImplementation "org.mockito:mockito-inline:${versionMap.mockito}" + testImplementation testLibs.mockito.inline } jacocoTestCoverageVerification { diff --git a/data-prepper-plugins/otel-trace-source/build.gradle b/data-prepper-plugins/otel-trace-source/build.gradle index 11f507c3fd..666b0b3262 100644 --- a/data-prepper-plugins/otel-trace-source/build.gradle +++ b/data-prepper-plugins/otel-trace-source/build.gradle @@ -15,20 +15,20 @@ dependencies { implementation project(':data-prepper-plugins:otel-proto-common') implementation 'commons-codec:commons-codec:1.15' testImplementation project(':data-prepper-api').sourceSets.test.output - implementation "io.opentelemetry.proto:opentelemetry-proto:${versionMap.opentelemetryProto}" + implementation libs.opentelemetry.proto implementation "commons-io:commons-io:2.11.0" implementation 'software.amazon.awssdk:s3' implementation 'software.amazon.awssdk:acm' - implementation "com.google.protobuf:protobuf-java-util:${versionMap.protobufJavaUtil}" - implementation "com.linecorp.armeria:armeria:${versionMap.armeria}" - implementation "com.linecorp.armeria:armeria-grpc:${versionMap.armeriaGrpc}" + implementation libs.protobuf.util + implementation libs.armeria.core + implementation libs.armeria.grpc implementation 'com.fasterxml.jackson.core:jackson-databind' implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml' implementation "org.apache.commons:commons-lang3:3.12.0" implementation "org.bouncycastle:bcprov-jdk15on:1.70" implementation "org.bouncycastle:bcpkix-jdk15on:1.70" testImplementation 'org.assertj:assertj-core:3.24.2' - testImplementation "org.mockito:mockito-inline:${versionMap.mockito}" + testImplementation testLibs.mockito.inline testImplementation("commons-io:commons-io:2.10.0") } diff --git a/data-prepper-plugins/peer-forwarder/build.gradle b/data-prepper-plugins/peer-forwarder/build.gradle index 80cb6d0241..01a7363325 100644 --- a/data-prepper-plugins/peer-forwarder/build.gradle +++ b/data-prepper-plugins/peer-forwarder/build.gradle @@ -18,7 +18,7 @@ dependencies { implementation project(':data-prepper-api') implementation project(':data-prepper-plugins:otel-proto-common') testImplementation project(':data-prepper-api').sourceSets.test.output - implementation "io.opentelemetry.proto:opentelemetry-proto:${versionMap.opentelemetryProto}" + implementation libs.opentelemetry.proto implementation "com.linecorp.armeria:armeria:1.9.2" implementation "com.linecorp.armeria:armeria-grpc:1.9.2" implementation 'com.amazonaws:aws-java-sdk-s3' @@ -28,7 +28,7 @@ dependencies { implementation "org.apache.commons:commons-lang3:3.12.0" implementation "commons-validator:commons-validator:1.7" testImplementation "org.hamcrest:hamcrest:2.2" - testImplementation "org.mockito:mockito-inline:${versionMap.mockito}" + testImplementation testLibs.mockito.inline testImplementation "commons-io:commons-io:2.10.0" testImplementation 'org.awaitility:awaitility:4.1.1' } diff --git a/data-prepper-plugins/service-map-stateful/build.gradle b/data-prepper-plugins/service-map-stateful/build.gradle index e1aa701692..da90186d5b 100644 --- a/data-prepper-plugins/service-map-stateful/build.gradle +++ b/data-prepper-plugins/service-map-stateful/build.gradle @@ -19,11 +19,11 @@ dependencies { implementation 'commons-codec:commons-codec:1.15' implementation 'io.micrometer:micrometer-core' implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation("io.opentelemetry.proto:opentelemetry-proto:${versionMap.opentelemetryProto}") { + implementation(libs.opentelemetry.proto) { exclude group: 'com.google.protobuf', module: 'protobuf-java' } - implementation "com.google.protobuf:protobuf-java:${versionMap.protobufJava}" - testImplementation "org.mockito:mockito-inline:${versionMap.mockito}" + implementation libs.protobuf.core + testImplementation testLibs.mockito.inline } jacocoTestCoverageVerification { diff --git a/e2e-test/build.gradle b/e2e-test/build.gradle index b10fa3e405..5363113dc3 100644 --- a/e2e-test/build.gradle +++ b/e2e-test/build.gradle @@ -46,7 +46,7 @@ subprojects { ext { dataPrepperJarFilepath = "${project.buildDir.name}/bin/data-prepper/" targetJavaVersion = project.hasProperty('endToEndJavaVersion') ? project.getProperty('endToEndJavaVersion') : '11' - targetOpenTelemetryVersion = project.hasProperty('openTelemetryVersion') ? project.getProperty('openTelemetryVersion') : "${versionMap.opentelemetryProto}" + targetOpenTelemetryVersion = project.hasProperty('openTelemetryVersion') ? project.getProperty('openTelemetryVersion') : "${libs.versions.opentelemetry.get()}" dataPrepperBaseImage = "eclipse-temurin:${targetJavaVersion}-jre-alpine" } } diff --git a/e2e-test/log/build.gradle b/e2e-test/log/build.gradle index cd8567a827..6c26b6da87 100644 --- a/e2e-test/log/build.gradle +++ b/e2e-test/log/build.gradle @@ -92,7 +92,7 @@ def removeDataPrepperDockerContainer(final DockerStopContainer stopDataPrepperDo * OpenSearch Docker tasks */ task pullOpenSearchDockerImage(type: DockerPullImage) { - image = "opensearchproject/opensearch:${versionMap.opensearchVersion}" + image = "opensearchproject/opensearch:${libs.versions.opensearch.get()}" } task createOpenSearchDockerContainer(type: DockerCreateContainer) { @@ -190,7 +190,7 @@ dependencies { integrationTestImplementation project(':data-prepper-plugins:common') integrationTestImplementation project(':data-prepper-plugins:log-generator-source') integrationTestImplementation project(':data-prepper-plugins:opensearch') - integrationTestImplementation "com.linecorp.armeria:armeria:${versionMap.armeria}" + integrationTestImplementation libs.armeria.core integrationTestImplementation "org.awaitility:awaitility:4.1.1" - integrationTestImplementation "org.opensearch.client:opensearch-rest-high-level-client:${versionMap.opensearchVersion}" + integrationTestImplementation libs.opensearch.rhlc } diff --git a/e2e-test/peerforwarder/build.gradle b/e2e-test/peerforwarder/build.gradle index 842f3e8aee..291e499a34 100644 --- a/e2e-test/peerforwarder/build.gradle +++ b/e2e-test/peerforwarder/build.gradle @@ -94,7 +94,7 @@ def removeDataPrepperDockerContainer(final DockerStopContainer stopDataPrepperDo * OpenSearch Docker tasks */ task pullOpenSearchDockerImage(type: DockerPullImage) { - image = "opensearchproject/opensearch:${versionMap.opensearchVersion}" + image = "opensearchproject/opensearch:${libs.versions.opensearch.get()}" } task createOpenSearchDockerContainer(type: DockerCreateContainer) { @@ -205,10 +205,10 @@ dependencies { integrationTestImplementation project(':data-prepper-plugins:opensearch') integrationTestImplementation project(':data-prepper-plugins:otel-trace-group-processor') integrationTestImplementation 'org.awaitility:awaitility:4.2.0' - integrationTestImplementation "io.opentelemetry.proto:opentelemetry-proto:${versionMap.opentelemetryProto}" - integrationTestImplementation "com.google.protobuf:protobuf-java-util:${versionMap.protobufJavaUtil}" - integrationTestImplementation "com.linecorp.armeria:armeria:${versionMap.armeria}" - integrationTestImplementation "com.linecorp.armeria:armeria-grpc:${versionMap.armeriaGrpc}" - integrationTestImplementation "org.opensearch.client:opensearch-rest-high-level-client:${versionMap.opensearchVersion}" + integrationTestImplementation libs.opentelemetry.proto + integrationTestImplementation libs.protobuf.util + integrationTestImplementation libs.armeria.core + integrationTestImplementation libs.armeria.grpc + integrationTestImplementation libs.opensearch.rhlc integrationTestImplementation 'com.fasterxml.jackson.core:jackson-databind' } diff --git a/e2e-test/trace/build.gradle b/e2e-test/trace/build.gradle index 4e229e93b2..f2a4574b26 100644 --- a/e2e-test/trace/build.gradle +++ b/e2e-test/trace/build.gradle @@ -114,7 +114,7 @@ def createDataPrepperDockerContainerFromPullImage(final String taskBaseName, fin * OpenSearch Docker tasks */ task pullOpenSearchDockerImage(type: DockerPullImage) { - image = "opensearchproject/opensearch:${versionMap.opensearchVersion}" + image = "opensearchproject/opensearch:${libs.versions.opensearch.get()}" } task createOpenSearchDockerContainer(type: DockerCreateContainer) { @@ -234,9 +234,9 @@ dependencies { integrationTestImplementation project(':data-prepper-plugins:otel-trace-group-processor') integrationTestImplementation 'org.awaitility:awaitility:4.2.0' integrationTestImplementation "io.opentelemetry.proto:opentelemetry-proto:${targetOpenTelemetryVersion}" - integrationTestImplementation "com.google.protobuf:protobuf-java-util:${versionMap.protobufJavaUtil}" - integrationTestImplementation "com.linecorp.armeria:armeria:${versionMap.armeria}" - integrationTestImplementation "com.linecorp.armeria:armeria-grpc:${versionMap.armeriaGrpc}" - integrationTestImplementation "org.opensearch.client:opensearch-rest-high-level-client:${versionMap.opensearchVersion}" + integrationTestImplementation libs.protobuf.util + integrationTestImplementation libs.armeria.core + integrationTestImplementation libs.armeria.grpc + integrationTestImplementation libs.opensearch.rhlc integrationTestImplementation 'com.fasterxml.jackson.core:jackson-databind' } diff --git a/settings.gradle b/settings.gradle index 0b6261b105..c74c2e2cfb 100644 --- a/settings.gradle +++ b/settings.gradle @@ -12,6 +12,36 @@ pluginManagement { rootProject.name = 'opensearch-data-prepper' +dependencyResolutionManagement { + versionCatalogs { + libs { + version('armeria', '1.20.3') + library('armeria-core', 'com.linecorp.armeria', 'armeria').versionRef('armeria') + library('armeria-grpc', 'com.linecorp.armeria', 'armeria-grpc').versionRef('armeria') + library('armeria-junit', 'com.linecorp.armeria', 'armeria-junit5').versionRef('armeria') + version('protobuf', '3.21.11') + library('protobuf-core', 'com.google.protobuf', 'protobuf-java').versionRef('protobuf') + library('protobuf-util', 'com.google.protobuf', 'protobuf-java-util').versionRef('protobuf') + version('opentelemetry', '0.16.0-alpha') + library('opentelemetry-proto', 'io.opentelemetry.proto', 'opentelemetry-proto').versionRef('opentelemetry') + version('opensearch', '1.3.7') + library('opensearch-rhlc', 'org.opensearch.client', 'opensearch-rest-high-level-client').versionRef('opensearch') + } + testLibs { + version('junit', '5.8.2') + version('mockito', '3.11.2') + library('junit-core', 'org.junit.jupiter', 'junit-jupiter').versionRef('junit') + library('junit-params', 'org.junit.jupiter', 'junit-jupiter-params').versionRef('junit') + library('junit-vintage', 'org.junit.vintage', 'junit-vintage-engine').versionRef('junit') + bundle('junit', ['junit-core', 'junit-params', 'junit-vintage']) + library('mockito-core', 'org.mockito', 'mockito-core').versionRef('mockito') + library('mockito-junit', 'org.mockito', 'mockito-junit-jupiter').versionRef('mockito') + library('mockito-inline', 'org.mockito', 'mockito-inline').versionRef('mockito') + bundle('mockito', ['mockito-core', 'mockito-junit']) + } + } +} + include 'data-prepper-api' include 'data-prepper-plugins' include 'data-prepper-core'