Skip to content

Commit

Permalink
[apache#3847] improvement(flink-connector): Add the scale version to …
Browse files Browse the repository at this point in the history
…the flink-connector artifact name. (apache#3853)

### What changes were proposed in this pull request?

Add the scale version to the flink-connector artifact name.

### Why are the changes needed?

The Flink connector has introduced scala-related dependencies, we'd
better add the scale version name to the artifact to make it more
user-friendly.


Fix: apache#3847 

### Does this PR introduce _any_ user-facing change?

N/A

### How was this patch tested?

Test locally.

<img width="939" alt="image"
src="https://github.com/datastrato/gravitino/assets/15794564/808a1b9a-1c43-46b7-b2dc-46a78fbef296">
  • Loading branch information
yuqi1129 authored and shaofengshi committed Jun 24, 2024
1 parent f324852 commit 0677af2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions flink-connector/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ repositories {

val flinkVersion: String = libs.versions.flink.get()
val scalaVersion: String = project.properties["scalaVersion"] as? String ?: extra["defaultScalaVersion"].toString()
val artifactName = "gravitino-${project.name}-$scalaVersion"

dependencies {
implementation(project(":api"))
Expand Down Expand Up @@ -142,3 +143,15 @@ tasks.test {
init(this)
}
}

tasks.withType<Jar> {
archiveBaseName.set(artifactName)
}

publishing {
publications {
withType<MavenPublication>().configureEach {
artifactId = artifactName
}
}
}

0 comments on commit 0677af2

Please sign in to comment.