This is an automated email from the ASF dual-hosted git repository.

fanng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/main by this push:
     new eaf48d1a5 [#4298]fix(flink-connector): fix scala version in flink 
connector (#4302)
eaf48d1a5 is described below

commit eaf48d1a585cc85b598cbe3cd887e2a101645fce
Author: Peidian li <[email protected]>
AuthorDate: Tue Jul 30 16:34:09 2024 +0800

    [#4298]fix(flink-connector): fix scala version in flink connector (#4302)
    
    ### What changes were proposed in this pull request?
    
    Flink only supports Scala 2.12. All scala API will removed in the future
    version.
    
    https://issues.apache.org/jira/browse/FLINK-23986
    https://issues.apache.org/jira/browse/FLINK-20845
    https://issues.apache.org/jira/browse/FLINK-13414
    
    ### Why are the changes needed?
    
    Fix: #4298
    
    ### Does this PR introduce _any_ user-facing change?
    
    - no
    
    ### How was this patch tested?
    
    - `./gradlew flink-connector:publishToMavenLocal
    -PdefaultScalaVersion=2.13 `
    
    
    
![image](https://github.com/user-attachments/assets/fa99b4f1-e5fd-49f6-a295-944b95c6b7b8)
---
 flink-connector/build.gradle.kts | 8 +++++++-
 settings.gradle.kts              | 3 ++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/flink-connector/build.gradle.kts b/flink-connector/build.gradle.kts
index f6776661b..a21dea4a1 100644
--- a/flink-connector/build.gradle.kts
+++ b/flink-connector/build.gradle.kts
@@ -27,7 +27,13 @@ repositories {
 }
 
 val flinkVersion: String = libs.versions.flink.get()
-val scalaVersion: String = project.properties["scalaVersion"] as? String ?: 
extra["defaultScalaVersion"].toString()
+
+// The Flink only support scala 2.12, and all scala api will be removed in a 
future version.
+// You can find more detail at the following issues:
+// https://issues.apache.org/jira/browse/FLINK-23986,
+// https://issues.apache.org/jira/browse/FLINK-20845,
+// https://issues.apache.org/jira/browse/FLINK-13414.
+val scalaVersion: String = "2.12"
 val artifactName = "gravitino-${project.name}-$scalaVersion"
 
 dependencies {
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 07af7ac2a..8938b67d2 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -54,13 +54,14 @@ if (scalaVersion == "2.12") {
   include("spark-connector:spark-3.3", "spark-connector:spark-runtime-3.3")
   project(":spark-connector:spark-3.3").projectDir = 
file("spark-connector/v3.3/spark")
   project(":spark-connector:spark-runtime-3.3").projectDir = 
file("spark-connector/v3.3/spark-runtime")
+  // flink only support scala 2.12
+  include("flink-connector")
 }
 include("spark-connector:spark-3.4", "spark-connector:spark-runtime-3.4", 
"spark-connector:spark-3.5", "spark-connector:spark-runtime-3.5")
 project(":spark-connector:spark-3.4").projectDir = 
file("spark-connector/v3.4/spark")
 project(":spark-connector:spark-runtime-3.4").projectDir = 
file("spark-connector/v3.4/spark-runtime")
 project(":spark-connector:spark-3.5").projectDir = 
file("spark-connector/v3.5/spark")
 project(":spark-connector:spark-runtime-3.5").projectDir = 
file("spark-connector/v3.5/spark-runtime")
-include("flink-connector")
 include("web")
 include("docs")
 include("integration-test-common")

Reply via email to