fix(bug): Fix form validation does not work in Kotlin.
Description
-
-Xjsr305=strict: This argument changes how the Kotlin compiler handles nullability annotations. The strict mode means that the compiler will strictly check nullability annotations and give a warning or error when it finds a problem. -
-Xemit-jvm-type-annotations: This argument makes the Kotlin compiler emit JVM type annotations into the bytecode.
Fixes #2343
Type of change
- [x] Bugfix
- [ ] Feature
Checklist
- [x] I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
- [x] I have added a description following the guideline.
- [x] The issue is created in the corresponding repository and I have referenced it.
- [x] I have added tests to ensure my change is effective and works as intended.
- [x] New and existing tests are passing locally with my change.
- [x] I have performed self-review and corrected misspellings.
Additional for Feature type of change
- [ ] Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
I apologize for my previous misunderstanding of the Groovy programming language. I was not aware that Groovy allows direct assignment to lists without the need to call the addAll method. I have tested these changes locally and confirmed their correctness. Please review this PR again, thank you.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 92.60%. Comparing base (
f7b7546) to head (69a524e). Report is 6 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #2529 +/- ##
=======================================
Coverage 92.60% 92.60%
=======================================
Files 85 85
Lines 3164 3164
Branches 775 775
=======================================
Hits 2930 2930
Misses 183 183
Partials 51 51
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 92.60% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks again for the idea @Yue-plus.
Upon a closer look, we found an issue with the approach in this PR: the additional arguments are only applied to the Gradle plugin project, but not the users' applications.
Let me close this as obsolete by #3156, which applies the arguments dynamically using reflection with kotlin-reflect.