You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ur...@apache.org on 2026/06/05 07:44:01 UTC

(airflow) branch main updated: Fix ktlint dependency to discriminator (#68058)

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 04b12c2540e Fix ktlint dependency to discriminator (#68058)
04b12c2540e is described below

commit 04b12c2540ed02b6b67c9170ed5230e86d027da9
Author: Tzu-ping Chung <ur...@gmail.com>
AuthorDate: Fri Jun 5 15:43:53 2026 +0800

    Fix ktlint dependency to discriminator (#68058)
---
 java-sdk/sdk/build.gradle.kts | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/java-sdk/sdk/build.gradle.kts b/java-sdk/sdk/build.gradle.kts
index f7917db6d99..ceea519fba6 100644
--- a/java-sdk/sdk/build.gradle.kts
+++ b/java-sdk/sdk/build.gradle.kts
@@ -155,8 +155,9 @@ abstract class GenerateDiscriminatorTask : DefaultTask() {
                 appendLine("// Maps every wire `type` discriminator string to its generated model class.")
                 appendLine("// Generated from the Supervisor Schema; do not edit by hand.")
                 appendLine("internal object Discriminator {")
-                appendLine("    val types: Map<String, Class<*>> = mapOf(")
-                entries.forEach { appendLine("        \"${it.wireType}\" to ${it.className}::class.java,") }
+                appendLine("  val types: Map<String, Class<*>> =")
+                appendLine("    mapOf(")
+                entries.forEach { appendLine("      \"${it.wireType}\" to ${it.className}::class.java,") }
                 appendLine("    )")
                 appendLine("}")
             },
@@ -241,7 +242,7 @@ tasks.named("compileKotlin") {
 }
 
 tasks.named("runKtlintCheckOverMainSourceSet") {
-    dependsOn("generateJsonSchema2Pojo")
+    dependsOn("generateJsonSchema2Pojo", "generateDiscriminator")
 }
 
 tasks.matching { it.name.startsWith("dokkaGenerate") }.configureEach {