Add Configuration for Kotlin's All-Open Plugin for JPA Entities#1576
Add Configuration for Kotlin's All-Open Plugin for JPA Entities#1576YangSiJun528 wants to merge 24 commits intospring-io:mainfrom
Conversation
- Rename methods - Simplify allOpen.invoke
- Add Configure kotlin + allOpen
- Add author tag of JavaDoc
|
I apologize for not thoroughly checking the code before opening this PR. I'll tag you once everything is resolved. Feel free to close the PR, and I'll open a new one after the fixes. |
mhalbritter
left a comment
There was a problem hiding this comment.
Hey @YangSiJun528,
thanks for the PR. I've left some comments.
| if (this.buildMetadataResolver.hasGroupId(build, "jakarta.persistence")) { | ||
| customizeAllOpenWithJakarta(build); | ||
| } | ||
| else if (this.buildMetadataResolver.hasGroupId(build, "javax.persistence")) { |
There was a problem hiding this comment.
We don't need to support JavaEE anymore. Our baseline is Spring Boot 3.2, which already uses JakartaEE.
| if (this.buildMetadataResolver.hasGroupId(build, "jakarta.persistence")) { | ||
| customizeAllOpenWithJakarta(configuration); | ||
| } | ||
| else if (this.buildMetadataResolver.hasGroupId(build, "javax.persistence")) { |
There was a problem hiding this comment.
We don't need to support JavaEE anymore.
| } | ||
|
|
||
| @Test | ||
| void customizeWhenJavaxPersistencePresentShouldCustomizeAllOpenWithJavax() { |
There was a problem hiding this comment.
We don't need to support JavaEE anymore.
|
|
||
| import static org.assertj.core.api.Assertions.assertThat; | ||
|
|
||
| /** |
There was a problem hiding this comment.
Why did you remove this?
| } | ||
|
|
||
| @Test | ||
| void customizeWhenJavaxPersistencePresentShouldCustomizeAllOpenWithJavax() { |
There was a problem hiding this comment.
No need to support JavaEE anymore.
|
I have fixed the bug and incorporated your feedback, @mhalbritter :
|
|
Thanks @YangSiJun528 ! |
Currently, theKotlinJpaGradleBuildCustomizerclass is responsible for configuring eitherjavaxorjakartadependencies. I believe a cleaner approach would be to split this functionality into two separate classes:KotlinJavaxJpaGradleBuildCustomizerKotlinJakartaJpaGradleBuildCustomizerI'm unsure whether these new classes should inherit fromKotlinJpaGradleBuildCustomizeror be designed as independent classes that implementBuildCustomizer. (similar toKotlinJpaMavenBuildCustomizer)I would appreciate feedback on this approach.The strikethrough was used because JavaEE support is no longer needed. This makes the previous concerns irrelevant.
Fixes gh-1572