You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "snazy (via GitHub)" <gi...@apache.org> on 2023/06/13 11:44:39 UTC

[GitHub] [iceberg] snazy commented on a diff in pull request #7694: Build: Replace usage of Nebula dependency recommender plugin with Gradle's versionCatalog

snazy commented on code in PR #7694:
URL: https://github.com/apache/iceberg/pull/7694#discussion_r1227943762


##########
libs.versions.toml:
##########
@@ -0,0 +1,161 @@
+# Also see settings.gradle file for dynamic versionCatalogs dependencies
+
+[versions]
+antlrVersion = "4.8"
+awsSdkVersion = "2.20.18"
+flink115Version = "1.15.0"
+flink116Version = "1.16.2"
+flink117Version = "1.17.1"
+hadoop2Version = "2.7.3"
+hive2Version = "2.3.9"
+hive3Version = "3.1.3"
+jackson211Version = "2.11.4"
+jackson212Version = "2.12.3"
+jackson213Version = "2.13.4"
+jacksonVersion = "2.14.2"
+jettyVersion = "9.4.43.v20210629"
+junitJupiterVersion = "5.9.2"
+mockitoVersion = "4.11.0"
+nessieVersion = "0.60.1"
+orcVersion = "1.8.3"
+parquetVersion = "1.13.1"
+springBootVersion = "2.5.4"
+tez010Version = "0.10.2"
+tez08Version = "0.8.4"
+
+[libraries]
+activation = "javax.activation:activation:1.1.1"
+aircompressor = "io.airlift:aircompressor:0.24"
+aliyun-sdk-oss = "com.aliyun.oss:aliyun-sdk-oss:3.10.2"
+antlr-antlr4 = { module = "org.antlr:antlr4", version.ref = "antlrVersion" }
+antlr-runtime = { module = "org.antlr:antlr4-runtime", version.ref = "antlrVersion" }
+arrow-memory-netty = "org.apache.arrow:arrow-memory-netty:11.0.0"
+arrow-vector = "org.apache.arrow:arrow-vector:11.0.0"
+avro-avro = "org.apache.avro:avro:1.11.1"
+awssdk-apache-client = { module = "software.amazon.awssdk:apache-client", version.ref = "awsSdkVersion" }

Review Comment:
   Hint: it's easier to use the 
   ```
   awssdk-bom = { module = "software.amazon.awssdk:bom", version = "2.20.18" }
   ```
   and reference the BOM in the build scripts and omit the versions for the individual artifacts. For example
   ```kotlin
       implementation(platform(libs.awssdk.bom))
       implementation("software.amazon.awssdk:apache-client")
   ```
   



##########
libs.versions.toml:
##########
@@ -0,0 +1,161 @@
+# Also see settings.gradle file for dynamic versionCatalogs dependencies
+
+[versions]
+antlrVersion = "4.8"
+awsSdkVersion = "2.20.18"
+flink115Version = "1.15.0"
+flink116Version = "1.16.2"
+flink117Version = "1.17.1"
+hadoop2Version = "2.7.3"
+hive2Version = "2.3.9"
+hive3Version = "3.1.3"
+jackson211Version = "2.11.4"
+jackson212Version = "2.12.3"
+jackson213Version = "2.13.4"
+jacksonVersion = "2.14.2"
+jettyVersion = "9.4.43.v20210629"
+junitJupiterVersion = "5.9.2"
+mockitoVersion = "4.11.0"
+nessieVersion = "0.60.1"
+orcVersion = "1.8.3"
+parquetVersion = "1.13.1"
+springBootVersion = "2.5.4"
+tez010Version = "0.10.2"
+tez08Version = "0.8.4"
+
+[libraries]
+activation = "javax.activation:activation:1.1.1"
+aircompressor = "io.airlift:aircompressor:0.24"
+aliyun-sdk-oss = "com.aliyun.oss:aliyun-sdk-oss:3.10.2"
+antlr-antlr4 = { module = "org.antlr:antlr4", version.ref = "antlrVersion" }
+antlr-runtime = { module = "org.antlr:antlr4-runtime", version.ref = "antlrVersion" }
+arrow-memory-netty = "org.apache.arrow:arrow-memory-netty:11.0.0"
+arrow-vector = "org.apache.arrow:arrow-vector:11.0.0"
+avro-avro = "org.apache.avro:avro:1.11.1"
+awssdk-apache-client = { module = "software.amazon.awssdk:apache-client", version.ref = "awsSdkVersion" }
+awssdk-auth = { module = "software.amazon.awssdk:auth", version.ref = "awsSdkVersion" }
+awssdk-dynamodb = { module = "software.amazon.awssdk:dynamodb", version.ref = "awsSdkVersion" }
+awssdk-glue = { module = "software.amazon.awssdk:glue", version.ref = "awsSdkVersion" }
+awssdk-kms = { module = "software.amazon.awssdk:kms", version.ref = "awsSdkVersion" }
+awssdk-lakeformation = { module = "software.amazon.awssdk:lakeformation", version.ref = "awsSdkVersion" }
+awssdk-s3 = { module = "software.amazon.awssdk:s3", version.ref = "awsSdkVersion" }
+awssdk-sts = { module = "software.amazon.awssdk:sts", version.ref = "awsSdkVersion" }
+awssdk-url-connection-client = { module = "software.amazon.awssdk:url-connection-client", version.ref = "awsSdkVersion" }
+caffeine = "com.github.ben-manes.caffeine:caffeine:2.9.3"
+calcite-core = "org.apache.calcite:calcite-core:1.10.0"
+calcite-druid = "org.apache.calcite:calcite-druid:1.10.0"
+errorprone-annotations = "com.google.errorprone:error_prone_annotations:2.3.3"
+findbugs-jsr305 = "com.google.code.findbugs:jsr305:3.0.2"
+flink115-avro = { module = "org.apache.flink:flink-avro", version.ref = "flink115Version" }
+flink115-connector-base = { module = "org.apache.flink:flink-connector-base", version.ref = "flink115Version" }
+flink115-connector-files = { module = "org.apache.flink:flink-connector-files", version.ref = "flink115Version" }
+flink115-metrics-dropwizard = { module = "org.apache.flink:flink-metrics-dropwizard", version.ref = "flink115Version" }
+flink115-streaming-java = { module = "org.apache.flink:flink-streaming-java", version.ref = "flink115Version" }
+flink115-table-api-java-bridge = { module = "org.apache.flink:flink-table-api-java-bridge", version.ref = "flink115Version" }
+flink116-avro = { module = "org.apache.flink:flink-avro", version.ref = "flink116Version" }
+flink116-connector-base = { module = "org.apache.flink:flink-connector-base", version.ref = "flink116Version" }
+flink116-connector-files = { module = "org.apache.flink:flink-connector-files", version.ref = "flink116Version" }
+flink116-metrics-dropwizard = { module = "org.apache.flink:flink-metrics-dropwizard", version.ref = "flink116Version" }
+flink116-streaming-java = { module = "org.apache.flink:flink-streaming-java", version.ref = "flink116Version" }
+flink116-table-api-java-bridge = { module = "org.apache.flink:flink-table-api-java-bridge", version.ref = "flink116Version" }
+flink117-avro = { module = "org.apache.flink:flink-avro", version.ref = "flink117Version" }
+flink117-connector-base = { module = "org.apache.flink:flink-connector-base", version.ref = "flink117Version" }
+flink117-connector-files = { module = "org.apache.flink:flink-connector-files", version.ref = "flink117Version" }
+flink117-metrics-dropwizard = { module = "org.apache.flink:flink-metrics-dropwizard", version.ref = "flink117Version" }
+flink117-streaming-java = { module = "org.apache.flink:flink-streaming-java", version.ref = "flink117Version" }
+flink117-table-api-java-bridge = { module = "org.apache.flink:flink-table-api-java-bridge", version.ref = "flink117Version" }
+google-cloud-storage = "com.google.cloud:google-cloud-storage:2.2.2"
+guava-guava = "com.google.guava:guava:31.1-jre"
+hadoop2-client = { module = "org.apache.hadoop:hadoop-client", version.ref = "hadoop2Version" }
+hadoop2-common = { module = "org.apache.hadoop:hadoop-common", version.ref = "hadoop2Version" }
+hadoop2-hdfs = { module = "org.apache.hadoop:hadoop-hdfs", version.ref = "hadoop2Version" }
+hadoop2-mapreduce-client-core = { module = "org.apache.hadoop:hadoop-mapreduce-client-core", version.ref = "hadoop2Version" }
+hadoop2-minicluster = { module = "org.apache.hadoop:hadoop-minicluster", version.ref = "hadoop2Version" }
+hadoop3-client = "org.apache.hadoop:hadoop-client:3.3.5"
+hive2-exec = { module = "org.apache.hive:hive-exec", version.ref = "hive2Version" }
+hive2-metastore = { module = "org.apache.hive:hive-metastore", version.ref = "hive2Version" }
+hive2-serde = { module = "org.apache.hive:hive-serde", version.ref = "hive2Version" }
+hive2-service = { module = "org.apache.hive:hive-service", version.ref = "hive2Version" }
+hive3-exec = { module = "org.apache.hive:hive-exec", version.ref = "hive3Version" }
+hive3-metastore = { module = "org.apache.hive:hive-metastore", version.ref = "hive3Version" }
+hive3-serde = { module = "org.apache.hive:hive-serde", version.ref = "hive3Version" }
+hive3-service = { module = "org.apache.hive:hive-service", version.ref = "hive3Version" }
+httpcomponents-httpclient5 = "org.apache.httpcomponents.client5:httpclient5:5.2.1"
+immutables-value = "org.immutables:value:2.9.2"
+jackson-core = { module = "com.fasterxml.jackson.core:jackson-core", version.ref = "jacksonVersion" }
+jackson-databind = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref = "jacksonVersion" }
+jackson211-core = { module = "com.fasterxml.jackson.core:jackson-core", version.ref = "jackson211Version" }
+jackson211-databind = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref = "jackson211Version" }
+jackson211-module-paranamer = { module = "com.fasterxml.jackson.module:jackson-module-paranamer", version.ref = "jackson211Version" }
+jackson212-core = { module = "com.fasterxml.jackson.core:jackson-core", version.ref = "jackson212Version" }
+jackson212-databind = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref = "jackson212Version" }
+jackson212-module-paranamer = { module = "com.fasterxml.jackson.module:jackson-module-paranamer", version.ref = "jackson212Version" }
+jackson213-core = { module = "com.fasterxml.jackson.core:jackson-core", version.ref = "jackson213Version" }
+jackson213-databind = "com.fasterxml.jackson.core:jackson-databind:2.13.4.2"
+jaxb-api = "javax.xml.bind:jaxb-api:2.3.1"
+jaxb-runtime = "org.glassfish.jaxb:jaxb-runtime:2.3.3"
+libraries-bom = "com.google.cloud:libraries-bom:24.1.0"
+microprofile-openapi-api = "org.eclipse.microprofile.openapi:microprofile-openapi-api:3.1"
+nessie-client = { module = "org.projectnessie.nessie:nessie-client", version.ref = "nessieVersion" }
+netty-buffer = "io.netty:netty-buffer:4.1.68.Final"
+object-client-bundle = "com.emc.ecs:object-client-bundle:3.3.2"
+orc-core = { module = "org.apache.orc:orc-core", version.ref = "orcVersion" }
+parquet-avro = { module = "org.apache.parquet:parquet-avro", version.ref = "parquetVersion" }
+parquet-column = { module = "org.apache.parquet:parquet-column", version.ref = "parquetVersion" }
+parquet-hadoop = { module = "org.apache.parquet:parquet-hadoop", version.ref = "parquetVersion" }
+pig = "org.apache.pig:pig:0.14.0"
+roaringbitmap = "org.roaringbitmap:RoaringBitmap:0.9.22"
+slf4j-api = "org.slf4j:slf4j-api:1.7.36"
+slf4j-simple = "org.slf4j:slf4j-simple:1.7.36"
+snowflake-jdbc = "net.snowflake:snowflake-jdbc:3.13.22"
+
+# test libraries
+assertj-core = "org.assertj:assertj-core:3.24.2"
+awaitility = "org.awaitility:awaitility:4.2.0"
+awssdk-iam = { module = "software.amazon.awssdk:iam", version.ref = "awsSdkVersion" }
+awssdk-s3control = { module = "software.amazon.awssdk:s3control", version.ref = "awsSdkVersion" }
+esotericsoftware-kryo = "com.esotericsoftware:kryo:4.0.2"
+flink115-connector-test-utils = { module = "org.apache.flink:flink-connector-test-utils", version.ref = "flink115Version" }

Review Comment:
   Should probably prefer a version-range described above w/ a preferred version for all the Flink major versions as well.



##########
libs.versions.toml:
##########
@@ -0,0 +1,161 @@
+# Also see settings.gradle file for dynamic versionCatalogs dependencies
+
+[versions]
+antlrVersion = "4.8"
+awsSdkVersion = "2.20.18"
+flink115Version = "1.15.0"
+flink116Version = "1.16.2"
+flink117Version = "1.17.1"
+hadoop2Version = "2.7.3"
+hive2Version = "2.3.9"
+hive3Version = "3.1.3"
+jackson211Version = "2.11.4"
+jackson212Version = "2.12.3"
+jackson213Version = "2.13.4"
+jacksonVersion = "2.14.2"
+jettyVersion = "9.4.43.v20210629"
+junitJupiterVersion = "5.9.2"
+mockitoVersion = "4.11.0"
+nessieVersion = "0.60.1"
+orcVersion = "1.8.3"
+parquetVersion = "1.13.1"
+springBootVersion = "2.5.4"
+tez010Version = "0.10.2"
+tez08Version = "0.8.4"
+
+[libraries]
+activation = "javax.activation:activation:1.1.1"
+aircompressor = "io.airlift:aircompressor:0.24"
+aliyun-sdk-oss = "com.aliyun.oss:aliyun-sdk-oss:3.10.2"
+antlr-antlr4 = { module = "org.antlr:antlr4", version.ref = "antlrVersion" }
+antlr-runtime = { module = "org.antlr:antlr4-runtime", version.ref = "antlrVersion" }
+arrow-memory-netty = "org.apache.arrow:arrow-memory-netty:11.0.0"
+arrow-vector = "org.apache.arrow:arrow-vector:11.0.0"
+avro-avro = "org.apache.avro:avro:1.11.1"
+awssdk-apache-client = { module = "software.amazon.awssdk:apache-client", version.ref = "awsSdkVersion" }
+awssdk-auth = { module = "software.amazon.awssdk:auth", version.ref = "awsSdkVersion" }
+awssdk-dynamodb = { module = "software.amazon.awssdk:dynamodb", version.ref = "awsSdkVersion" }
+awssdk-glue = { module = "software.amazon.awssdk:glue", version.ref = "awsSdkVersion" }
+awssdk-kms = { module = "software.amazon.awssdk:kms", version.ref = "awsSdkVersion" }
+awssdk-lakeformation = { module = "software.amazon.awssdk:lakeformation", version.ref = "awsSdkVersion" }
+awssdk-s3 = { module = "software.amazon.awssdk:s3", version.ref = "awsSdkVersion" }
+awssdk-sts = { module = "software.amazon.awssdk:sts", version.ref = "awsSdkVersion" }
+awssdk-url-connection-client = { module = "software.amazon.awssdk:url-connection-client", version.ref = "awsSdkVersion" }
+caffeine = "com.github.ben-manes.caffeine:caffeine:2.9.3"
+calcite-core = "org.apache.calcite:calcite-core:1.10.0"
+calcite-druid = "org.apache.calcite:calcite-druid:1.10.0"
+errorprone-annotations = "com.google.errorprone:error_prone_annotations:2.3.3"
+findbugs-jsr305 = "com.google.code.findbugs:jsr305:3.0.2"
+flink115-avro = { module = "org.apache.flink:flink-avro", version.ref = "flink115Version" }

Review Comment:
   (Same comment as for the Jackson dependencies below, including the "BOM approach")



##########
settings.gradle:
##########
@@ -192,3 +194,27 @@ if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
   }
 }
 
+dependencyResolutionManagement {
+  versionCatalogs {
+    libs {
+      from(files("./libs.versions.toml"))
+
+      library("delta-standalone", "io.delta:delta-standalone_${scalaVersion}:0.6.0")
+      library("flink115-table-planner", "org.apache.flink:flink-table-planner_${scalaVersion}:1.15.0")

Review Comment:
   Hm. The Flink, Jackson, Scala and Spark versions are all declared in `libs.versions.toml`. Having those in two places is going to cause trouble. I doubt that Dependabot is smart enough to update any of these in this block due to the `${scalaVersion}` code block.



##########
libs.versions.toml:
##########
@@ -0,0 +1,161 @@
+# Also see settings.gradle file for dynamic versionCatalogs dependencies
+
+[versions]
+antlrVersion = "4.8"
+awsSdkVersion = "2.20.18"
+flink115Version = "1.15.0"
+flink116Version = "1.16.2"
+flink117Version = "1.17.1"
+hadoop2Version = "2.7.3"
+hive2Version = "2.3.9"
+hive3Version = "3.1.3"
+jackson211Version = "2.11.4"
+jackson212Version = "2.12.3"
+jackson213Version = "2.13.4"
+jacksonVersion = "2.14.2"
+jettyVersion = "9.4.43.v20210629"
+junitJupiterVersion = "5.9.2"
+mockitoVersion = "4.11.0"
+nessieVersion = "0.60.1"
+orcVersion = "1.8.3"
+parquetVersion = "1.13.1"
+springBootVersion = "2.5.4"
+tez010Version = "0.10.2"
+tez08Version = "0.8.4"
+
+[libraries]
+activation = "javax.activation:activation:1.1.1"
+aircompressor = "io.airlift:aircompressor:0.24"
+aliyun-sdk-oss = "com.aliyun.oss:aliyun-sdk-oss:3.10.2"
+antlr-antlr4 = { module = "org.antlr:antlr4", version.ref = "antlrVersion" }
+antlr-runtime = { module = "org.antlr:antlr4-runtime", version.ref = "antlrVersion" }
+arrow-memory-netty = "org.apache.arrow:arrow-memory-netty:11.0.0"
+arrow-vector = "org.apache.arrow:arrow-vector:11.0.0"
+avro-avro = "org.apache.avro:avro:1.11.1"
+awssdk-apache-client = { module = "software.amazon.awssdk:apache-client", version.ref = "awsSdkVersion" }
+awssdk-auth = { module = "software.amazon.awssdk:auth", version.ref = "awsSdkVersion" }
+awssdk-dynamodb = { module = "software.amazon.awssdk:dynamodb", version.ref = "awsSdkVersion" }
+awssdk-glue = { module = "software.amazon.awssdk:glue", version.ref = "awsSdkVersion" }
+awssdk-kms = { module = "software.amazon.awssdk:kms", version.ref = "awsSdkVersion" }
+awssdk-lakeformation = { module = "software.amazon.awssdk:lakeformation", version.ref = "awsSdkVersion" }
+awssdk-s3 = { module = "software.amazon.awssdk:s3", version.ref = "awsSdkVersion" }
+awssdk-sts = { module = "software.amazon.awssdk:sts", version.ref = "awsSdkVersion" }
+awssdk-url-connection-client = { module = "software.amazon.awssdk:url-connection-client", version.ref = "awsSdkVersion" }
+caffeine = "com.github.ben-manes.caffeine:caffeine:2.9.3"
+calcite-core = "org.apache.calcite:calcite-core:1.10.0"
+calcite-druid = "org.apache.calcite:calcite-druid:1.10.0"
+errorprone-annotations = "com.google.errorprone:error_prone_annotations:2.3.3"
+findbugs-jsr305 = "com.google.code.findbugs:jsr305:3.0.2"
+flink115-avro = { module = "org.apache.flink:flink-avro", version.ref = "flink115Version" }
+flink115-connector-base = { module = "org.apache.flink:flink-connector-base", version.ref = "flink115Version" }
+flink115-connector-files = { module = "org.apache.flink:flink-connector-files", version.ref = "flink115Version" }
+flink115-metrics-dropwizard = { module = "org.apache.flink:flink-metrics-dropwizard", version.ref = "flink115Version" }
+flink115-streaming-java = { module = "org.apache.flink:flink-streaming-java", version.ref = "flink115Version" }
+flink115-table-api-java-bridge = { module = "org.apache.flink:flink-table-api-java-bridge", version.ref = "flink115Version" }
+flink116-avro = { module = "org.apache.flink:flink-avro", version.ref = "flink116Version" }
+flink116-connector-base = { module = "org.apache.flink:flink-connector-base", version.ref = "flink116Version" }
+flink116-connector-files = { module = "org.apache.flink:flink-connector-files", version.ref = "flink116Version" }
+flink116-metrics-dropwizard = { module = "org.apache.flink:flink-metrics-dropwizard", version.ref = "flink116Version" }
+flink116-streaming-java = { module = "org.apache.flink:flink-streaming-java", version.ref = "flink116Version" }
+flink116-table-api-java-bridge = { module = "org.apache.flink:flink-table-api-java-bridge", version.ref = "flink116Version" }
+flink117-avro = { module = "org.apache.flink:flink-avro", version.ref = "flink117Version" }
+flink117-connector-base = { module = "org.apache.flink:flink-connector-base", version.ref = "flink117Version" }
+flink117-connector-files = { module = "org.apache.flink:flink-connector-files", version.ref = "flink117Version" }
+flink117-metrics-dropwizard = { module = "org.apache.flink:flink-metrics-dropwizard", version.ref = "flink117Version" }
+flink117-streaming-java = { module = "org.apache.flink:flink-streaming-java", version.ref = "flink117Version" }
+flink117-table-api-java-bridge = { module = "org.apache.flink:flink-table-api-java-bridge", version.ref = "flink117Version" }
+google-cloud-storage = "com.google.cloud:google-cloud-storage:2.2.2"
+guava-guava = "com.google.guava:guava:31.1-jre"
+hadoop2-client = { module = "org.apache.hadoop:hadoop-client", version.ref = "hadoop2Version" }
+hadoop2-common = { module = "org.apache.hadoop:hadoop-common", version.ref = "hadoop2Version" }
+hadoop2-hdfs = { module = "org.apache.hadoop:hadoop-hdfs", version.ref = "hadoop2Version" }
+hadoop2-mapreduce-client-core = { module = "org.apache.hadoop:hadoop-mapreduce-client-core", version.ref = "hadoop2Version" }
+hadoop2-minicluster = { module = "org.apache.hadoop:hadoop-minicluster", version.ref = "hadoop2Version" }
+hadoop3-client = "org.apache.hadoop:hadoop-client:3.3.5"
+hive2-exec = { module = "org.apache.hive:hive-exec", version.ref = "hive2Version" }
+hive2-metastore = { module = "org.apache.hive:hive-metastore", version.ref = "hive2Version" }
+hive2-serde = { module = "org.apache.hive:hive-serde", version.ref = "hive2Version" }
+hive2-service = { module = "org.apache.hive:hive-service", version.ref = "hive2Version" }
+hive3-exec = { module = "org.apache.hive:hive-exec", version.ref = "hive3Version" }
+hive3-metastore = { module = "org.apache.hive:hive-metastore", version.ref = "hive3Version" }
+hive3-serde = { module = "org.apache.hive:hive-serde", version.ref = "hive3Version" }
+hive3-service = { module = "org.apache.hive:hive-service", version.ref = "hive3Version" }
+httpcomponents-httpclient5 = "org.apache.httpcomponents.client5:httpclient5:5.2.1"
+immutables-value = "org.immutables:value:2.9.2"
+jackson-core = { module = "com.fasterxml.jackson.core:jackson-core", version.ref = "jacksonVersion" }
+jackson-databind = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref = "jacksonVersion" }
+jackson211-core = { module = "com.fasterxml.jackson.core:jackson-core", version.ref = "jackson211Version" }

Review Comment:
   These different Jackson versions would confuse at least Renovate, and pretty sure also Dependabot, because it likely opens PRs to align all these versions.
   
   The following approach is "nicer" to such tools - it works with Renovate, because it ignores e.g. version ranges (don't know about Dependabot).
   * Use the jackson BOMs
   * Declare the "latest" as for example `jackson-bom = { module = "com.fasterxml.jackson:jackson-bom", version = "2.15.2" }`
   * And declare the "older" versions as for example `jackson211-bom = { module = "com.fasterxml.jackson:jackson-bom", version = { strictly = "[2.11, 2.12[", prefer = "2.11.4"}}`
   
   We use a similar approach for [Scala](https://github.com/projectnessie/nessie/blob/main/gradle/libs.versions.toml#L149) and [Spark](https://github.com/projectnessie/nessie/blob/main/gradle/libs.versions.toml#L154).



##########
build.gradle:
##########
@@ -212,15 +203,15 @@ subprojects {
   targetCompatibility = '1.8'
 
   dependencies {
-    implementation 'org.slf4j:slf4j-api'
+    implementation libs.slf4j.api
 
-    testImplementation 'org.junit.vintage:junit-vintage-engine'
-    testImplementation 'org.junit.jupiter:junit-jupiter-engine'
-    testImplementation 'org.junit.jupiter:junit-jupiter'
-    testImplementation 'org.slf4j:slf4j-simple'
-    testImplementation 'org.mockito:mockito-core'
-    testImplementation 'org.mockito:mockito-inline'
-    testImplementation 'org.assertj:assertj-core'
+    testImplementation libs.junit.vintage.engine

Review Comment:
   Hint: JUnit engines should be referenced as `testRuntimeOnly`, same for the Jupiter engine below.



##########
.github/labeler.yml:
##########
@@ -30,7 +30,6 @@ INFRA:
   - dev/**/*
 BUILD:
   - "**/*gradle*"
-  - versions.props

Review Comment:
   Should this be replaced with the version catalog file?



##########
settings.gradle:
##########
@@ -192,3 +194,27 @@ if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
   }
 }
 
+dependencyResolutionManagement {
+  versionCatalogs {
+    libs {
+      from(files("./libs.versions.toml"))

Review Comment:
   If you move `libs.versions.toml` to the `gradle/` directory, you can omit this one.



##########
settings.gradle:
##########
@@ -56,6 +56,8 @@ project(':dell').name = 'iceberg-dell'
 project(':snowflake').name = 'iceberg-snowflake'
 project(':delta-lake').name = 'iceberg-delta-lake'
 
+

Review Comment:
   Nit: 2 new unnecessary new lines



##########
spark/v3.2/build.gradle:
##########
@@ -31,10 +30,10 @@ configure(sparkProjects) {
   configurations {
     all {
       resolutionStrategy {

Review Comment:
   Not related to this PR, but wonder why the `resolutionStrategy` for 3.1/3.2 differs from 3.3/3.4.



##########
settings.gradle:
##########
@@ -192,3 +194,27 @@ if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
   }
 }
 
+dependencyResolutionManagement {
+  versionCatalogs {
+    libs {
+      from(files("./libs.versions.toml"))
+
+      library("delta-standalone", "io.delta:delta-standalone_${scalaVersion}:0.6.0")
+      library("flink115-table-planner", "org.apache.flink:flink-table-planner_${scalaVersion}:1.15.0")

Review Comment:
   The Flink and Jackson declarations can be avoided when using the BOM approach:
   * Declare a `platform()` dependency to the BOM
   * Declare the Flink/Jackson dependency, but w/o the version (because that is declared in the BOM)
   
   Example:
   ```kotlin
       implementation(platform(libs.flink115.bom))
       implementation("org.apache.flink:flink-table-planner_${scalaVersion}")
   ```
   



##########
libs.versions.toml:
##########
@@ -0,0 +1,161 @@
+# Also see settings.gradle file for dynamic versionCatalogs dependencies
+
+[versions]
+antlrVersion = "4.8"
+awsSdkVersion = "2.20.18"
+flink115Version = "1.15.0"
+flink116Version = "1.16.2"
+flink117Version = "1.17.1"
+hadoop2Version = "2.7.3"
+hive2Version = "2.3.9"

Review Comment:
   Might be necessary to declare a version-range for Hive 2 to "not confuse Dependabot" (see below / Jackson comment). Sad that neither Hive nor Hadoop publish a BOM.



##########
settings.gradle:
##########
@@ -192,3 +194,27 @@ if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
   }
 }
 
+dependencyResolutionManagement {
+  versionCatalogs {
+    libs {
+      from(files("./libs.versions.toml"))
+
+      library("delta-standalone", "io.delta:delta-standalone_${scalaVersion}:0.6.0")
+      library("flink115-table-planner", "org.apache.flink:flink-table-planner_${scalaVersion}:1.15.0")
+      library("flink116-table-planner", "org.apache.flink:flink-table-planner_${scalaVersion}:1.16.2")
+      library("flink117-table-planner", "org.apache.flink:flink-table-planner_${scalaVersion}:1.17.1")
+      library("jackson211-module-scala", "com.fasterxml.jackson.module:jackson-module-scala_${scalaVersion}:2.11.4")
+      library("jackson212-module-scala", "com.fasterxml.jackson.module:jackson-module-scala_${scalaVersion}:2.12.3")
+      library("jackson213-module-scala", "com.fasterxml.jackson.module:jackson-module-scala_${scalaVersion}:2.13.4")
+      library("scala-collection-compat", "org.scala-lang.modules:scala-collection-compat_${scalaVersion}:2.6.0")

Review Comment:
   For projects that do not publish a BOM, it's a bit trickier to remove the hard-coded versions here.
   You probably have to declare these dependencies in `libs.versions.tom` as well, but replace the hard-coded versions here with something like this in the `build.gradle` files:
   ```groovy
   implementation("org.scala-lang.modules:scala-collection-compat_${scalaVersion}:${libs.versions.scalaCollectionCompatVersion}")
   ```
   
   And in the `libs.versions.toml` file declare the libararies for one Scala version (or all, up to you). That way, those versions are managed via the version catalog as well.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org