Skip to content

Conversation

@vauns
Copy link

@vauns vauns commented Jun 29, 2023

[hotfix] Fix flinkVersionNew based on versions greater than or equal to 1.15

@vauns vauns changed the title [hotfix] [hotfix] Fix flinkVersionNew >= 1.15 Jun 29, 2023
@vauns
Copy link
Author

vauns commented Jun 30, 2023

ext {
    // because the version 1.1.5+ without scalaBinaryVersion
    flinkVersionNew = flinkVersion.toString().replace("-SNAPSHOT", "") >= "1.15" 
}
if (flinkVersionNew) {
    mainClassName = '${organization}.DataStreamJob'
} else {
    mainClassName = '${organization}.StreamingJob'
}
dependencies {
    if (flinkVersionNew) {
        implementation "org.apache.flink:flink-streaming-java:\${flinkVersion}"
        implementation "org.apache.flink:flink-clients:\${flinkVersion}"
    } else {
        implementation "org.apache.flink:flink-streaming-java_\${scalaBinaryVersion}:\${flinkVersion}"
        implementation "org.apache.flink:flink-clients_\${scalaBinaryVersion}:\${flinkVersion}"
    }
}

@vauns vauns closed this by deleting the head repository Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant