From 3c1ec98c1fd7efffa86c532c143932e05346d3ea Mon Sep 17 00:00:00 2001 From: Devin Smith Date: Wed, 26 Jun 2024 13:19:23 -0700 Subject: [PATCH] migrate awssdk --- buildSrc/src/main/groovy/Classpaths.groovy | 11 ----------- extensions/iceberg/s3/build.gradle | 8 +++++--- extensions/s3/build.gradle | 6 ++++-- gradle/libs.versions.toml | 7 +++++++ 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/buildSrc/src/main/groovy/Classpaths.groovy b/buildSrc/src/main/groovy/Classpaths.groovy index c98f9a225a0..c6fab216f21 100644 --- a/buildSrc/src/main/groovy/Classpaths.groovy +++ b/buildSrc/src/main/groovy/Classpaths.groovy @@ -33,9 +33,6 @@ class Classpaths { static final String HADOOP_GROUP = 'org.apache.hadoop' static final String HADOOP_VERSION = '3.4.0' - static final String AWSSDK_GROUP = 'software.amazon.awssdk' - static final String AWSSDK_VERSION = '2.24.5' - static boolean addDependency(Configuration conf, String group, String name, String version, Action configure = Actions.doNothing()) { if (!conf.dependencies.find { it.name == name && it.group == group}) { DefaultExternalModuleDependency dep = dependency group, name, version @@ -94,12 +91,4 @@ class Classpaths { inheritParquetHadoopConfiguration(p, configName) addDependency(config, HADOOP_GROUP, 'hadoop-hdfs-client', HADOOP_VERSION) } - - static void inheritAWSSDK(Project p, String configName = JavaPlugin.IMPLEMENTATION_CONFIGURATION_NAME) { - Configuration config = p.configurations.getByName(configName) - addDependency(config, p.getDependencies().platform(AWSSDK_GROUP + ":bom:" + AWSSDK_VERSION)) - - addDependency(config, AWSSDK_GROUP, 's3', AWSSDK_VERSION) - addDependency(config, AWSSDK_GROUP, 'aws-crt-client', AWSSDK_VERSION) - } } diff --git a/extensions/iceberg/s3/build.gradle b/extensions/iceberg/s3/build.gradle index 48b0c764e0b..bde1e84bc7f 100644 --- a/extensions/iceberg/s3/build.gradle +++ b/extensions/iceberg/s3/build.gradle @@ -20,9 +20,11 @@ dependencies { implementation project(':extensions-s3') implementation libs.iceberg.aws - Classpaths.inheritAWSSDK(project) - runtimeOnly "software.amazon.awssdk:sts" - runtimeOnly "software.amazon.awssdk:glue" + implementation platform(libs.awssdk.bom) + implementation libs.awssdk.s3 + implementation libs.awssdk.crt.client + runtimeOnly libs.awssdk.sts + runtimeOnly libs.awssdk.glue testImplementation libs.testcontainers testImplementation libs.testcontainers.junit.jupiter diff --git a/extensions/s3/build.gradle b/extensions/s3/build.gradle index 287562c7d2a..c4488f3ef32 100644 --- a/extensions/s3/build.gradle +++ b/extensions/s3/build.gradle @@ -16,7 +16,9 @@ dependencies { implementation project(':Configuration') implementation project(':log-factory') - Classpaths.inheritAWSSDK(project) + implementation platform(libs.awssdk.bom) + implementation libs.awssdk.s3 + implementation libs.awssdk.crt.client compileOnly depAnnotations @@ -35,7 +37,7 @@ dependencies { testRuntimeOnly libs.junit.jupiter.engine testRuntimeOnly libs.junit.platform.launcher - testImplementation 'software.amazon.awssdk:s3-transfer-manager' + testImplementation libs.awssdk.s3.transfer.manager testImplementation libs.testcontainers testImplementation libs.testcontainers.junit.jupiter testImplementation libs.testcontainers.localstack diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ab8a2fdf21c..f5f1ca824f0 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,6 +2,7 @@ arrow = "13.0.0" autoservice = "1.0.1" avro = "1.11.3" +awssdk = "2.24.5" # See dependency matrix for particular gRPC versions at https://github.com/grpc/grpc-java/blob/master/SECURITY.md#netty boringssl = "2.0.61.Final" commons = "1.10.0" @@ -43,6 +44,12 @@ arrow-flight-grpc = { module = "org.apache.arrow:flight-grpc", version.ref = "ar autoservice = { module = "com.google.auto.service:auto-service-annotations", version.ref = "autoservice" } autoservice-compiler = { module = "com.google.auto.service:auto-service", version.ref = "autoservice" } avro = { module = "org.apache.avro:avro", version.ref = "avro" } +awssdk-bom = { module = "software.amazon.awssdk:bom", version.ref = "awssdk"} +awssdk-crt-client = { module = "software.amazon.awssdk:aws-crt-client" } +awssdk-glue = { module = "software.amazon.awssdk:glue" } +awssdk-s3 = { module = "software.amazon.awssdk:s3" } +awssdk-s3-transfer-manager = { module = "software.amazon.awssdk:s3-transfer-manager" } +awssdk-sts = { module = "software.amazon.awssdk:sts" } boringssl = { module = "io.netty:netty-tcnative-boringssl-static", version.ref = "boringssl" } commons-text = { module = "org.apache.commons:commons-text", version.ref = "commons" } dagger = { module = "com.google.dagger:dagger", version.ref = "dagger" }