openinx commented on a change in pull request #4157:
URL: https://github.com/apache/iceberg/pull/4157#discussion_r811700041



##########
File path: flink/v1.12/build.gradle
##########
@@ -17,18 +17,11 @@
  * under the License.
  */
 
-def flinkProjects = [
-    project(':iceberg-flink:iceberg-flink-1.12'),
-    project(':iceberg-flink:iceberg-flink-runtime-1.12')
-]
-
-configure(flinkProjects) {
-  project.ext {
-    flinkVersion = '1.12.5'
-  }
-}
+String flinkVersion = '1.12.5'
+String flinkMajorVersion = '1.12'
+String scalaVersion = System.getProperty("scalaVersion") != null ? 
System.getProperty("scalaVersion") : System.getProperty("defaultScalaVersion")
 
-project(':iceberg-flink:iceberg-flink-1.12') {
+project(":iceberg-flink:iceberg-flink-${flinkMajorVersion}_${scalaVersion}") {

Review comment:
       @rdblue @kbendick Seems I made a mistake here ? Since we apache iceberg 
flink & flink-runtime modules don't introduce any scala dependencies, so in 
theory the iceberg-flink-1.14.jar & iceberg-flink-runtime-1.14.jar can work 
fine on both flink-1.14.0-bin-scala_2.11 & flink-1.14.0-bin-scala_2.12 release. 
 So we don't need to add any `_${scalaVersion}` suffix for `iceberg-flink` & 
`iceberg-flink-runtime` jar.
   
   (But we still need this PR to make iceberg-flink/iceber-flink-runtime 
compile on different scala version ).

##########
File path: flink/v1.12/build.gradle
##########
@@ -17,18 +17,11 @@
  * under the License.
  */
 
-def flinkProjects = [
-    project(':iceberg-flink:iceberg-flink-1.12'),
-    project(':iceberg-flink:iceberg-flink-runtime-1.12')
-]
-
-configure(flinkProjects) {
-  project.ext {
-    flinkVersion = '1.12.5'
-  }
-}
+String flinkVersion = '1.12.5'
+String flinkMajorVersion = '1.12'
+String scalaVersion = System.getProperty("scalaVersion") != null ? 
System.getProperty("scalaVersion") : System.getProperty("defaultScalaVersion")
 
-project(':iceberg-flink:iceberg-flink-1.12') {
+project(":iceberg-flink:iceberg-flink-${flinkMajorVersion}_${scalaVersion}") {

Review comment:
       ➜  iceberg git:(master) ✗ ./gradlew 
:iceberg-flink:iceberg-flink-runtime-1.14_2.12:dependencies --configuration 
runtimeClasspath        
   
   ```
   > Task :iceberg-flink:iceberg-flink-runtime-1.14_2.12:dependencies
   
   ------------------------------------------------------------
   Project ':iceberg-flink:iceberg-flink-runtime-1.14_2.12'
   ------------------------------------------------------------
   
   runtimeClasspath - Runtime classpath of source set 'main'.
   +--- com.github.stephenc.findbugs:findbugs-annotations -> 1.3.9-1
   +--- project :iceberg-flink:iceberg-flink-1.14_2.12
   |    +--- project :iceberg-api
   |    |    +--- com.github.stephenc.findbugs:findbugs-annotations -> 1.3.9-1
   |    |    \--- project :iceberg-bundled-guava
   |    +--- project :iceberg-data
   |    |    +--- project :iceberg-api (*)
   |    |    +--- com.github.stephenc.findbugs:findbugs-annotations -> 1.3.9-1
   |    |    +--- project :iceberg-bundled-guava
   |    |    +--- project :iceberg-core
   |    |    |    +--- project :iceberg-api (*)
   |    |    |    +--- com.github.stephenc.findbugs:findbugs-annotations -> 
1.3.9-1
   |    |    |    +--- project :iceberg-common
   |    |    |    |    +--- com.github.stephenc.findbugs:findbugs-annotations 
-> 1.3.9-1
   |    |    |    |    \--- project :iceberg-bundled-guava
   |    |    |    +--- project :iceberg-bundled-guava
   |    |    |    +--- org.apache.avro:avro -> 1.10.1
   |    |    |    |    +--- com.fasterxml.jackson.core:jackson-core:2.11.3 -> 
2.11.4
   |    |    |    |    \--- com.fasterxml.jackson.core:jackson-databind:2.11.3 
-> 2.11.4
   |    |    |    |         +--- 
com.fasterxml.jackson.core:jackson-annotations:2.11.4
   |    |    |    |         \--- com.fasterxml.jackson.core:jackson-core:2.11.4
   |    |    |    +--- com.fasterxml.jackson.core:jackson-databind -> 2.11.4 (*)
   |    |    |    +--- com.fasterxml.jackson.core:jackson-core -> 2.11.4
   |    |    |    +--- com.github.ben-manes.caffeine:caffeine -> 2.8.4
   |    |    |    |    +--- org.checkerframework:checker-qual:3.4.0
   |    |    |    |    \--- com.google.errorprone:error_prone_annotations:2.3.4
   |    |    |    \--- org.roaringbitmap:RoaringBitmap -> 0.9.22
   |    |    |         \--- org.roaringbitmap:shims:0.9.22
   |    |    +--- org.apache.orc:orc-core -> 1.7.3
   |    |    |    +--- org.apache.orc:orc-shims:1.7.3
   |    |    |    +--- io.airlift:aircompressor:0.21
   |    |    |    +--- org.jetbrains:annotations:17.0.0
   |    |    |    \--- org.threeten:threeten-extra:1.5.0
   |    |    \--- org.apache.parquet:parquet-avro -> 1.12.2
   |    |         +--- org.apache.parquet:parquet-column:1.12.2
   |    |         |    +--- org.apache.parquet:parquet-common:1.12.2
   |    |         |    |    +--- 
org.apache.parquet:parquet-format-structures:1.12.2
   |    |         |    |    \--- org.apache.yetus:audience-annotations:0.12.0
   |    |         |    \--- org.apache.parquet:parquet-encoding:1.12.2
   |    |         |         \--- org.apache.parquet:parquet-common:1.12.2 (*)
   |    |         +--- org.apache.parquet:parquet-hadoop:1.12.2
   |    |         |    +--- org.apache.parquet:parquet-column:1.12.2 (*)
   |    |         |    +--- org.apache.parquet:parquet-format-structures:1.12.2
   |    |         |    +--- org.apache.parquet:parquet-jackson:1.12.2
   |    |         |    \--- com.github.luben:zstd-jni:1.4.9-1
   |    |         \--- org.apache.parquet:parquet-format-structures:1.12.2
   |    +--- com.github.stephenc.findbugs:findbugs-annotations -> 1.3.9-1
   |    +--- project :iceberg-bundled-guava
   |    +--- project :iceberg-common (*)
   |    +--- project :iceberg-core (*)
   |    +--- project :iceberg-orc
   |    |    +--- project :iceberg-api (*)
   |    |    +--- com.github.stephenc.findbugs:findbugs-annotations -> 1.3.9-1
   |    |    +--- project :iceberg-bundled-guava
   |    |    +--- project :iceberg-core (*)
   |    |    +--- org.apache.avro:avro -> 1.10.1 (*)
   |    |    \--- org.apache.orc:orc-core -> 1.7.3 (*)
   |    +--- project :iceberg-parquet
   |    |    +--- project :iceberg-api (*)
   |    |    +--- com.github.stephenc.findbugs:findbugs-annotations -> 1.3.9-1
   |    |    +--- project :iceberg-bundled-guava
   |    |    +--- project :iceberg-core (*)
   |    |    +--- project :iceberg-common (*)
   |    |    \--- org.apache.parquet:parquet-avro -> 1.12.2 (*)
   |    +--- project :iceberg-hive-metastore
   |    |    +--- project :iceberg-api (*)
   |    |    +--- com.github.stephenc.findbugs:findbugs-annotations -> 1.3.9-1
   |    |    +--- project :iceberg-bundled-guava
   |    |    +--- project :iceberg-core (*)
   |    |    +--- project :iceberg-common (*)
   |    |    \--- com.github.ben-manes.caffeine:caffeine -> 2.8.4 (*)
   |    +--- org.apache.parquet:parquet-avro -> 1.12.2 (*)
   |    \--- org.apache.orc:orc-core -> 1.7.3 (*)
   +--- project :iceberg-aws
   |    +--- project :iceberg-api (*)
   |    +--- com.github.stephenc.findbugs:findbugs-annotations -> 1.3.9-1
   |    +--- project :iceberg-bundled-guava
   |    +--- project :iceberg-common (*)
   |    \--- project :iceberg-core (*)
   +--- project :iceberg-aliyun
   |    +--- project :iceberg-api (*)
   |    +--- com.github.stephenc.findbugs:findbugs-annotations -> 1.3.9-1
   |    +--- project :iceberg-bundled-guava
   |    +--- project :iceberg-core (*)
   |    \--- project :iceberg-common (*)
   \--- project :iceberg-nessie
        +--- project :iceberg-api (*)
        +--- com.github.stephenc.findbugs:findbugs-annotations -> 1.3.9-1
        +--- project :iceberg-common (*)
        +--- project :iceberg-core (*)
        +--- project :iceberg-bundled-guava
        \--- org.projectnessie:nessie-client -> 0.20.1
             \--- org.projectnessie:nessie-model:0.20.1
   
   (*) - dependencies omitted (listed previously)
   
   A web-based, searchable dependency report is available by adding the --scan 
option.
   
   Deprecated Gradle features were used in this build, making it incompatible 
with Gradle 8.0.
   
   You can use '--warning-mode all' to show the individual deprecation warnings 
and determine if they come from your own scripts or plugins.
   
   See 
https://docs.gradle.org/7.4/userguide/command_line_interface.html#sec:command_line_warnings
   
   BUILD SUCCESSFUL in 29s
   1 actionable task: 1 executed
   ```




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to