From e318acc4c728401915dd700a9b1a1bcc6fc143bc Mon Sep 17 00:00:00 2001 From: m1a2st Date: Wed, 11 Dec 2024 16:03:20 +0800 Subject: [PATCH 1/5] update the README.md new section about IntelliJ Configuration --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index b8275004aace7..a461bdf40c639 100644 --- a/README.md +++ b/README.md @@ -258,3 +258,15 @@ Apache Kafka is interested in building the community; we would welcome any thoug To contribute follow the instructions here: * https://kafka.apache.org/contributing.html + +### IntelliJ Configuration for Kafka Development ### + +When developing Kafka in IntelliJ, **it is recommended to set the project SDK to Java 17**. While some modules, such as client +and streams, support Java 11 as the minimum version, most modules require Java 17. Setting the SDK to Java 17 provides +the best compromise for code navigation and overall development experience. + +Expected IntelliJ Behavior +Due to Kafka's use of Gradle and varying module-level Java version requirements: +- IntelliJ will automatically check Java syntax and compatibility for each module based on the Java version specified in the + module's `build.gradle` file. +- IntelliJ does not automatically configure the correct Java version for each module in Structure > Project Settings > Modules. From 0a8febdc99c81426fe1469fd8ff7bb79c255df70 Mon Sep 17 00:00:00 2001 From: m1a2st Date: Thu, 12 Dec 2024 02:00:10 +0800 Subject: [PATCH 2/5] addressed by comment --- README.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index a461bdf40c639..b4c6958e3eab7 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,16 @@ The `eclipse` task has been configured to use `${project_dir}/build_eclipse` as build directory (`${project_dir}/bin`) clashes with Kafka's scripts directory and we don't use Gradle's build directory to avoid known issues with this configuration. +When developing Kafka in IntelliJ, **it is recommended to set the project SDK to Java 17**. While some modules, such as client +and streams, support Java 11 as the minimum version, most modules require Java 17. Setting the SDK to Java 17 provides +the best compromise for code navigation and overall development experience. + +Expected IntelliJ Behavior +Due to Kafka's use of Gradle and varying module-level Java version requirements: +- IntelliJ will automatically check Java syntax and compatibility for each module based on the Java version specified in the + module's `build.gradle` file. +- IntelliJ does not automatically configure the correct Java version for each module in Structure > Project Settings > Modules. + ### Publishing the streams quickstart archetype artifact to maven ### For the Streams archetype project, one cannot use gradle to upload to maven; instead the `mvn deploy` command needs to be called at the quickstart folder: @@ -258,15 +268,3 @@ Apache Kafka is interested in building the community; we would welcome any thoug To contribute follow the instructions here: * https://kafka.apache.org/contributing.html - -### IntelliJ Configuration for Kafka Development ### - -When developing Kafka in IntelliJ, **it is recommended to set the project SDK to Java 17**. While some modules, such as client -and streams, support Java 11 as the minimum version, most modules require Java 17. Setting the SDK to Java 17 provides -the best compromise for code navigation and overall development experience. - -Expected IntelliJ Behavior -Due to Kafka's use of Gradle and varying module-level Java version requirements: -- IntelliJ will automatically check Java syntax and compatibility for each module based on the Java version specified in the - module's `build.gradle` file. -- IntelliJ does not automatically configure the correct Java version for each module in Structure > Project Settings > Modules. From ab1694054d26e437562dd5a97972bc82df00b0cd Mon Sep 17 00:00:00 2001 From: m1a2st Date: Fri, 13 Dec 2024 08:10:10 +0800 Subject: [PATCH 3/5] addressed by comment --- README.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b4c6958e3eab7..a03402091787c 100644 --- a/README.md +++ b/README.md @@ -121,6 +121,7 @@ Streams has multiple sub-projects, but you can run all the tests: ./gradlew tasks ### Building IDE project #### +*Note Pleasure ensure that JDK17 is used when developing Kafka.* *Note that this is not strictly necessary (IntelliJ IDEA has good built-in support for Gradle projects, for example).* ./gradlew eclipse @@ -130,15 +131,10 @@ The `eclipse` task has been configured to use `${project_dir}/build_eclipse` as build directory (`${project_dir}/bin`) clashes with Kafka's scripts directory and we don't use Gradle's build directory to avoid known issues with this configuration. -When developing Kafka in IntelliJ, **it is recommended to set the project SDK to Java 17**. While some modules, such as client -and streams, support Java 11 as the minimum version, most modules require Java 17. Setting the SDK to Java 17 provides -the best compromise for code navigation and overall development experience. +IntelliJ Language Level awareness: -Expected IntelliJ Behavior -Due to Kafka's use of Gradle and varying module-level Java version requirements: -- IntelliJ will automatically check Java syntax and compatibility for each module based on the Java version specified in the - module's `build.gradle` file. -- IntelliJ does not automatically configure the correct Java version for each module in Structure > Project Settings > Modules. +IntelliJ will automatically check Java syntax and compatibility for each module, even if the Java version is not +explicitly set in the Structure > Project Settings > Modules. ### Publishing the streams quickstart archetype artifact to maven ### For the Streams archetype project, one cannot use gradle to upload to maven; instead the `mvn deploy` command needs to be called at the quickstart folder: From 82a52298daae84198fda743d0f1dddeced69799d Mon Sep 17 00:00:00 2001 From: m1a2st Date: Fri, 13 Dec 2024 08:11:11 +0800 Subject: [PATCH 4/5] addressed by comment --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a03402091787c..596e78f0703ea 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,7 @@ Streams has multiple sub-projects, but you can run all the tests: ### Building IDE project #### *Note Pleasure ensure that JDK17 is used when developing Kafka.* + *Note that this is not strictly necessary (IntelliJ IDEA has good built-in support for Gradle projects, for example).* ./gradlew eclipse From 58702d682a6b736865ae860ab48b2740c3d90028 Mon Sep 17 00:00:00 2001 From: m1a2st Date: Fri, 13 Dec 2024 08:11:42 +0800 Subject: [PATCH 5/5] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 596e78f0703ea..7f039efdd6cf2 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ Streams has multiple sub-projects, but you can run all the tests: ./gradlew tasks ### Building IDE project #### -*Note Pleasure ensure that JDK17 is used when developing Kafka.* +*Note Please ensure that JDK17 is used when developing Kafka.* *Note that this is not strictly necessary (IntelliJ IDEA has good built-in support for Gradle projects, for example).*