Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supports Spring Boot Kotlin and Jimmer(Java&Kotlin) #11301

Open
BingZi-233 opened this issue Nov 4, 2024 · 12 comments
Open

Supports Spring Boot Kotlin and Jimmer(Java&Kotlin) #11301

BingZi-233 opened this issue Nov 4, 2024 · 12 comments

Comments

@BingZi-233
Copy link

No description provided.

@pascalgrimaud
Copy link
Member

Adding the support of Spring Boot + Kotlin is not hard, but the problem would be for maintainer
Do you want to provide the feature and maintain it @BingZi-233 ?

@BingZi-233
Copy link
Author

BingZi-233 commented Nov 5, 2024

I think I can maintain it, and I decided to abandon another plan for jhipster-lite.

@BingZi-233
Copy link
Author

Too bad I can't find an easy way to add what I want to add.

@pascalgrimaud
Copy link
Member

The first step is simply to add a new module: maven-kotlin in java-build-tool group:

image

@pascalgrimaud
Copy link
Member

Then, the 2nd module would be: kotlin-base, which is similar to java-base but for kotlin.

With these 2 modules, we'll be able to start to code a kotlin library. The Spring Boot module for kotlin must be done later, after these 2 modules

@pascalgrimaud
Copy link
Member

That's why I asked you if you want to code these modules and maintain them, as it's a lot of work.
Not sure in the core team, we'll have the bandwidth to maintain something we don't use ;-)

@BingZi-233
Copy link
Author

BingZi-233 commented Nov 5, 2024

I've tried to do this locally, Kotlin only relies on Gradle modules.
It's not clear to me how to add the Kotlin plugin to Gradle's template at the moment. I'm still trying to add it, hopefully it won't mess up.
Although I didn't see the reply until I had already finished adding, I was hoping that I had complied with the relevant specifications.
QQ_1730818137329
QQ_1730818219982

@BingZi-233
Copy link
Author

BingZi-233 commented Nov 5, 2024

Kotlin support only needs to add a plugin to Gradle and doesn't affect any other parts.

@BingZi-233
Copy link
Author

BingZi-233 commented Nov 5, 2024

I wanted to add a Gradle plugin of type kotlin("jvm") version "1.9.25", but I don't see a corresponding class that can be used to add it.
QQ_1730819569407

@BingZi-233
Copy link
Author

Looks like I've done this part, and it's a bit weird to write this way.
QQ_1730820154796

@pascalgrimaud
Copy link
Member

I don't think gradle-kotlin should depend on gradle-java

@BingZi-233
Copy link
Author

It is as it should be, just as an additional language extension. Does not replace gradle-java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants