Skip to content

Commit

Permalink
migrate awssdk
Browse files Browse the repository at this point in the history
  • Loading branch information
devinrsmith committed Jun 26, 2024
1 parent 3c59308 commit 3c1ec98
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
11 changes: 0 additions & 11 deletions buildSrc/src/main/groovy/Classpaths.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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<? super DefaultExternalModuleDependency> configure = Actions.doNothing()) {
if (!conf.dependencies.find { it.name == name && it.group == group}) {
DefaultExternalModuleDependency dep = dependency group, name, version
Expand Down Expand Up @@ -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)
}
}
8 changes: 5 additions & 3 deletions extensions/iceberg/s3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions extensions/s3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
7 changes: 7 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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" }
Expand Down

0 comments on commit 3c1ec98

Please sign in to comment.