From 98b0d00e5deb70f69892d5df03bf716ad4751b15 Mon Sep 17 00:00:00 2001 From: Yue_plus Date: Tue, 11 Jun 2024 09:36:18 +0800 Subject: [PATCH 1/3] fix #2343 --- packages/java/gradle-plugin/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/java/gradle-plugin/build.gradle b/packages/java/gradle-plugin/build.gradle index cc339877c9..2af920ae91 100644 --- a/packages/java/gradle-plugin/build.gradle +++ b/packages/java/gradle-plugin/build.gradle @@ -204,5 +204,6 @@ kotlin { compileKotlin { kotlinOptions { jvmTarget = "17" + freeCompilerArgs.addAll "-Xjsr305=strict", "-Xemit-jvm-type-annotations" } } From 6aa90c00553c3e443e281eb213d7ef6e248fae8e Mon Sep 17 00:00:00 2001 From: Anton Platonov Date: Thu, 13 Jun 2024 11:36:44 +0300 Subject: [PATCH 2/3] chore: Add a comment about the Kotlin compiler flag --- packages/java/gradle-plugin/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/java/gradle-plugin/build.gradle b/packages/java/gradle-plugin/build.gradle index 2af920ae91..1541ed5946 100644 --- a/packages/java/gradle-plugin/build.gradle +++ b/packages/java/gradle-plugin/build.gradle @@ -204,6 +204,7 @@ kotlin { compileKotlin { kotlinOptions { jvmTarget = "17" + // Hilla relies on annotations from JVM bytecode, see: https://github.com/vaadin/hilla/issues/2343 freeCompilerArgs.addAll "-Xjsr305=strict", "-Xemit-jvm-type-annotations" } } From 7b318c348d0494caf5d728931e8aed15d43d48c2 Mon Sep 17 00:00:00 2001 From: Yue-plus Date: Sat, 15 Jun 2024 00:11:31 +0800 Subject: [PATCH 3/3] fix(build.gradle): Groovy Syntax Error --- packages/java/gradle-plugin/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/java/gradle-plugin/build.gradle b/packages/java/gradle-plugin/build.gradle index 1541ed5946..43adb00f0c 100644 --- a/packages/java/gradle-plugin/build.gradle +++ b/packages/java/gradle-plugin/build.gradle @@ -205,6 +205,6 @@ compileKotlin { kotlinOptions { jvmTarget = "17" // Hilla relies on annotations from JVM bytecode, see: https://github.com/vaadin/hilla/issues/2343 - freeCompilerArgs.addAll "-Xjsr305=strict", "-Xemit-jvm-type-annotations" + freeCompilerArgs = ["-Xjsr305=strict", "-Xemit-jvm-type-annotations"] } }