Hi all. Can you please confirm that there is curre...
# koin
e
Hi all. Can you please confirm that there is currently no official support for using Koin annotations with Maven (only the DSL works), and that the only way to use annotations is via Gradle? https://insert-koin.io/docs/reference/koin-annotations/start/ I need Koin annotations for my Maven Kotlin JVM backend
👀 1
k
Hey @Edgar Avuzi, it should be available...any errors you are getting?
e
Hi Kibet, I did not try to scaffold a Maven + Koin annotations project yet. If there is a public project on GitHub with that, I would steal that. I see no documentation in Koin website with Maven + Koin annotations. Just asking if ppl already did that and if works for them
a
KSP is mainly Gradle config. I don't get your point here 🤔
e
I have a Maven project without DI and cannot migrate to Gradle. I explore options to add DI there. And wanted to start example project trying Maven with Koin annotations. Ok, so if KSP is smth really Gradle-specific, nothing to be done as far as I understand. Correct?
a
Check on KSP project for help about this. Else Koin (no annotations) should be easier to configure
👍 1
gratitude thank you 1
m
The real question is whether Koin uses a Kotlin compiler plugin wrapped in a Gradle plugin or whether at least part of the functionality is directly implemented as a Gradle plugin. I don’t know. If it is mainly a compiler plugin, then this should be callable via Maven too. A long time ago I tried something similar with Compose. I built a Compose application and instead of using the provided Gradle Compose plugin I configured the Kotlin compiler to use the Compose Kotlin compiler plugin directly. That worked, but to be honest, I would not recommend it. The whole Kotlin ecosystem is orbiting around Gradle and it quickly gets a pain trying to escape from that.
💡 1
👍 1
👏 1
e
Thanks, this extra info is interesting. Will try to migrate to Gradle so that to align with common trend
k
@Michael Paus it is not a compiler plugin and depends on KSP for code generation
m
I have never used KSP but the home page says: Kotlin Symbol Processing (KSP) is an API that you can use to develop lightweight compiler plugins. KSP provides a simplified compiler plugin API that leverages the power of Kotlin while keeping the learning curve at a minimum. So, according to my understanding, KSP is used to create compiler plugins and even if this creation process may be controlled by Gradle, this does not exclude the possibility to later use that plugin via Maven. But as I already said. I wouldn’t recommend it.