This is an automated email from the ASF dual-hosted git repository.
martijnvisser pushed a commit to branch release-1.15
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.15 by this push:
new 6588ae7249f [FLINK-25897][docs] Update gradle quickstart quide to
gradle 7.3.3
6588ae7249f is described below
commit 6588ae7249f7c40ce362bff8d35d3c1220f02c37
Author: Marios Trivyzas <[email protected]>
AuthorDate: Wed Feb 2 16:26:03 2022 +0200
[FLINK-25897][docs] Update gradle quickstart quide to gradle 7.3.3
(cherry picked from commit 9b2d03a2a4e075d9e307644af36bbd888be7f4ed)
---
docs/content/docs/dev/configuration/overview.md | 27 +++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/docs/content/docs/dev/configuration/overview.md
b/docs/content/docs/dev/configuration/overview.md
index 4ba7f83c36e..0ac9dbadf3c 100644
--- a/docs/content/docs/dev/configuration/overview.md
+++ b/docs/content/docs/dev/configuration/overview.md
@@ -76,7 +76,10 @@ $ curl https://flink.apache.org/q/quickstart.sh | bash -s
{{< version >}}
{{< /tab >}}
{{< tab "Gradle" >}}
-You can create a project with a Gradle build script or use the provided
quickstart bash script.
+You can create an empty project, where you are required to create the
`src/main/java` and
+`src/main/resources` directories manually and start writing some class(es) in
that, with the use
+of the following Gradle build script or instead use the provided quickstart
bash script to get a
+completely functional startup project.
### Gradle build script
@@ -94,25 +97,31 @@ plugins {
// artifact properties
group = 'org.quickstart'
version = '0.1-SNAPSHOT'
-mainClassName = 'org.quickstart.StreamingJob'
-mainClassName = 'org.quickstart.StreamingJob'
+mainClassName = 'org.quickstart.DataStreamJob'
description = """Flink Quickstart Job"""
ext {
javaVersion = '1.8'
flinkVersion = '{{< version >}}'
+ scalaBinaryVersion = '{{< scala_version >}}'
slf4jVersion = '1.7.32'
log4jVersion = '2.17.1'
}
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
tasks.withType(JavaCompile) {
- options.encoding = 'UTF-8'
+ options.encoding = 'UTF-8'
}
applicationDefaultJvmArgs = ["-Dlog4j.configurationFile=log4j2.properties"]
// declare where to find the dependencies of your project
repositories {
mavenCentral()
+ maven {
+ url "https://repository.apache.org/content/repositories/snapshots"
+ mavenContent {
+ snapshotsOnly()
+ }
+ }
}
// NOTE: We cannot use "compileOnly" or "shadow" configurations since then we
could not run code
// in the IDE or with "gradle run". We also cannot exclude transitive
dependencies from the
@@ -139,10 +148,9 @@ dependencies {
// connectors. These must be in the flinkShadowJar configuration!
// --------------------------------------------------------------
//flinkShadowJar "org.apache.flink:flink-connector-kafka:${flinkVersion}"
+ runtimeOnly "org.apache.logging.log4j:log4j-slf4j-impl:${log4jVersion}"
runtimeOnly "org.apache.logging.log4j:log4j-api:${log4jVersion}"
runtimeOnly "org.apache.logging.log4j:log4j-core:${log4jVersion}"
- runtimeOnly "org.apache.logging.log4j:log4j-slf4j-impl:${log4jVersion}"
- runtimeOnly "org.slf4j:slf4j-log4j12:${slf4jVersion}"
// Add test dependencies here.
// testCompile "junit:junit:4.12"
}
@@ -156,6 +164,13 @@ sourceSets {
}
run.classpath = sourceSets.main.runtimeClasspath
+jar {
+ manifest {
+ attributes 'Built-By': System.getProperty('user.name'),
+ 'Build-Jdk': System.getProperty('java.version')
+ }
+}
+
shadowJar {
configurations = [project.configurations.flinkShadowJar]
}