You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dagger is the king of DI on Android. With the rise of KMP & KMM only service locator libs are available. It would be great if Dagger can become a multiplatform DI framework to avoid all these runtime crashes
Reacted by Mino aka Cha, Balázs Püspök-Kiss, Peter, Michal Havryluk, m3sv, Dragos-Mihai Rachieru, Khalid, Hocine A. Houari, Brian, Swapnil Musale and 70 more
Reacted by IsakTheHacker, Juan Esteban Londoño Tabares, Juan Ramón González, Dmitry, Bulat Galeev and Valentin Freshmorsikov
In order to do KMP we would have to finish KSP work (#2349). KMP is also a very large project as we would have to rewrite all of our generated code to be in Kotlin. We also still have to consider users who only use Java, so it would probably mean having two modes, which is a lot of extra work. Basically this is all to say, this is a lot of work and probably won't happen for a while given we aren't done with KSP yet.
Reacted by Zeyad, Alex Liu, Michal Havryluk, m3sv, Dragos-Mihai Rachieru, rekaszeru, IsakTheHacker, Norbert, tosinonik, Thomas Kioko and 4 more
Okay, my bad. At first I though it would be a good joke, but now when I read it, it looks weird
Reacted by Waqas Tahir, Emmanuel Mtali, Jacob Ras, Shubham Singh, Andriy Deputat, Vincent Masselis, Bruno Rosa, IsakTheHacker, Roberto Fuentes, Louis Qian and 4 more
Hey folks, so it's been almost a year since the discussion started and Hilt has already made its transition to ksp.
Got me thinking, any chance we might see Hilt jumping on the KMP train in 2025-26? Any buzz or plans floating around?
That'd be awesome!
Reacted by Bruno Rosa, IsakTheHacker, Václav Novák, Aleksha, vadyms, Jorge Castro, Jesús Barrera Méndez and Illia Achour
Hey folks, so it's been almost a year since the discussion started and Hilt has already made its transition to ksp. Got me thinking, any chance we might see Hilt jumping on the KMP train in 2025-26? Any buzz or plans floating around? That'd be awesome!
Not all issues related to KSP are closed:
area: ksp
Dagger(/Hilt) on Android is popular, as we see people prefer it over other available options.
When extending Android projects to KMP, Dagger(/Hilt) would still be my first preference if had a choice. I know many others share the same thoughts when they have to consider other options on KMP for DI.
I understand the effort is significant, but I hope the team can at least agree there is a plan to support KMP, even if the timeline does not exist yet? Thank you.
Reacted by Hameed Chishti, Aleksha, Snorlax, skyecodes, IsakTheHacker, Tomáš Procházka, vadyms and Illia Achour
Currently, there aren’t plans to work on a KMP version of Dagger or Hilt right now. Our team has discussed this but it isn’t in our current roadmap. KSP is also still in alpha since there are still a number of edge cases we’re working on, so it is a bit premature for us start on KMP. Also, while KSP was a large project, KMP support might somehow be even larger in that we’d have to support generating Kotlin as well as Java (there are still Java users out there who may not want Kotlin generated) and we already know of some tough compatibility issues we’d have to deal with there. This isn't ruling out KMP support, but also just want to set realistic expectations.
Reacted by Tosin Onikute, Animasahun Ibrahim (teewhydope), Severiano Jaramillo, Justas Medeišis, Svyatoslav Chatchenko, Juan, Ben Kane, Pushpal Roy, Karan Sharma and Chris Hatton
Reacted by Oleksandr, Animasahun Ibrahim (teewhydope), Jorge Costa, Mark Turner, Kaan Büyükerdem, skyecodes, JJSarrasin, Ruslan, IsakTheHacker, Mattster and 9 more
Reacted by Rymbek, Roberto Fuentes, Rifqi Fardi Pradhana, Kaan Büyükerdem, Nikita Vasilchenko, skyecodes, IsakTheHacker, Michael Albanese, Peter Qi, Abdelraouf Sabri and 7 more
Hey @Chang-Eric , is ksp in alpha? From their versioning scheme it doesn't seem to be the case.
Do you keep a list of issues that are considered blockers ?(if you could share those, I would like to follow them)
@juliocbcotta Sorry if that was confusing, I meant to say Dagger's support of KSP is still in alpha.
Most of what we're trying to resolve as blockers before moving our support from alpha to stable is performance and getting internal projects on to Dagger KSP successfully. There's some performance stuff discussed in #4180, but also there are a number of issues we've run into internally while trying to switch projects at Google over to KSP from KAPT. Some of those issues are internal only and some of them have publicly filed issues, but I don't really want to list them out here since I don't really want to drive traffic to them. We already work pretty closely with the KSP team internally and they know about the issues we're hitting, so I don't want to add pressure from people since they already know it is a priority.
Reacted by Severiano Jaramillo, IsakTheHacker, Bogdan Zurac, Daniel Oliveira, Svyatoslav Chatchenko, Juan, Kҽʋιɳ Sҽɾɾαɳσ, Mohammad AlBdour, Karan Sharma, Illia Achour and 2 more
Reacted by Trevor Jones, Justas Medeišis, IsakTheHacker, Daniel Oliveira and Juan
It basically means the end of Hilt/Dagger or Android because even in a corporate environment, where everything happens really slowly, Hilt is becoming deprecated because of the focus on future kmp compatibility. Which is quite sad since it has some benefits over other solutions.
Reacted by Francis, IsakTheHacker and Farhad Beigirad
Reacted by Jonathan Bluett-Duncan, tonylibra, Mahmoud Aly, Jorge Castro, Jesús Barrera Méndez and Illia Achour
Giving an update as some things have changed since my last update a year ago and we never really gave an update on our new plans.
Over the past months we have been working to support KMP and so this is now actually on our roadmap. We have been migrating to XPoet to support Kotlin generation, but even with that nearing completion, there are still a number of hurdles to cross like issues with nullability, visibility, generic types, and dependencies like our dependency on javax and jakarta. There’s no clear date when this will be done, especially since we’re still working on supporting KSP2 which is in itself a blocker for KMP, but we thought we should update this since we are at least working on it.
It basically means the end of Hilt/Dagger
We’re still here =)
Reacted by shenghaiyang, Abdelraouf Sabri, Gabriel Diniz, ecdpalma, Alexander Karkossa, Juan Ramón González, Nikolay Metchev, Mikhail Pogorelov, Fedor Erofeev, Andy and 31 more
Reacted by Roberto Fuentes, Ryan W, Dan Tech, Animasahun Ibrahim (teewhydope), Gustavo de Santos Garcia, Dzmitry Rymarau, Alexandre Gressier, Brian, Vikram Singh, Lin Min Phyo and 108 more
Reacted by Abdelraouf Sabri, Jakub Stefanowski, Doohyun and Yuri Araújo
Reacted by yaniv-z, Jesús Barrera Méndez, Jesús Barrera, Ahmed Mourad, Daniel Fernando, David, Daniel, Akira Aratani, Tomonori Matsukawa, IsakTheHacker and 4 more
Reacted by yaniv-z, Hardik Shrestha, timemanx, zhiguoWang, abdelrahman-esam and Hammad Zafar Bawara
Reacted by Zac Sweers, burningfireplace, Animasahun Ibrahim (teewhydope), Jeremy Tecson, Abdelraouf Sabri, Alexander Karkossa, Yasuhiro SHIMIZU, Mikhail Pogorelov, mginev, Bernardo Ferrari and 5 more
Reacted by est7, Oliver Vicente, Mett-Barr, Tomori Nao, Lucas Bueno, nicely-mobile, enesgemci, Juan Herrera, Morgan Koh, yaniv-z and 7 more
@GXBaum yes, this is still on the roadmap. The progress slowed/stopped due to multiple issues -- first, the switch from KSP1 to KSP2, and then the shift to focus on KSP performance issues. However, the performance work is wrapping up and we are now in a position to get back to this soon.
Reacted by Dmytro Turskyi, Kyrylo Mikos, Severiano Jaramillo, GXBaum, Abdelraouf Sabri, Egor Dubina, Waffiq Aziz, timemanx, Takahiro Menju and Ian Arbuckle
Activity
Chang-Eric commentedon Jul 11, 2023
In order to do KMP we would have to finish KSP work (#2349). KMP is also a very large project as we would have to rewrite all of our generated code to be in Kotlin. We also still have to consider users who only use Java, so it would probably mean having two modes, which is a lot of extra work. Basically this is all to say, this is a lot of work and probably won't happen for a while given we aren't done with KSP yet.
shalva97 commentedon Jul 17, 2023
natros commentedon Jul 17, 2023
shalva97 commentedon Jul 17, 2023
Okay, my bad. At first I though it would be a good joke, but now when I read it, it looks weird
robercoding commentedon Apr 24, 2024
Hey folks, so it's been almost a year since the discussion started and Hilt has already made its transition to ksp.
Got me thinking, any chance we might see Hilt jumping on the KMP train in 2025-26? Any buzz or plans floating around?
That'd be awesome!
Shusek commentedon Apr 29, 2024
Not all issues related to KSP are closed:
area: ksp
ryanw-mobile commentedon May 4, 2024
Dagger(/Hilt) on Android is popular, as we see people prefer it over other available options.
When extending Android projects to KMP, Dagger(/Hilt) would still be my first preference if had a choice. I know many others share the same thoughts when they have to consider other options on KMP for DI.
I understand the effort is significant, but I hope the team can at least agree there is a plan to support KMP, even if the timeline does not exist yet? Thank you.
Chang-Eric commentedon May 6, 2024
Currently, there aren’t plans to work on a KMP version of Dagger or Hilt right now. Our team has discussed this but it isn’t in our current roadmap. KSP is also still in alpha since there are still a number of edge cases we’re working on, so it is a bit premature for us start on KMP. Also, while KSP was a large project, KMP support might somehow be even larger in that we’d have to support generating Kotlin as well as Java (there are still Java users out there who may not want Kotlin generated) and we already know of some tough compatibility issues we’d have to deal with there. This isn't ruling out KMP support, but also just want to set realistic expectations.
juliocbcotta commentedon May 23, 2024
Hey @Chang-Eric , is ksp in alpha? From their versioning scheme it doesn't seem to be the case.
Do you keep a list of issues that are considered blockers ?(if you could share those, I would like to follow them)
Chang-Eric commentedon May 23, 2024
@juliocbcotta Sorry if that was confusing, I meant to say Dagger's support of KSP is still in alpha.
Most of what we're trying to resolve as blockers before moving our support from alpha to stable is performance and getting internal projects on to Dagger KSP successfully. There's some performance stuff discussed in #4180, but also there are a number of issues we've run into internally while trying to switch projects at Google over to KSP from KAPT. Some of those issues are internal only and some of them have publicly filed issues, but I don't really want to list them out here since I don't really want to drive traffic to them. We already work pretty closely with the KSP team internally and they know about the issues we're hitting, so I don't want to add pressure from people since they already know it is a priority.
tprochazka commentedon Mar 30, 2025
It basically means the end of Hilt/Dagger or Android because even in a corporate environment, where everything happens really slowly, Hilt is becoming deprecated because of the focus on future kmp compatibility. Which is quite sad since it has some benefits over other solutions.
Chang-Eric commentedon Apr 23, 2025
Giving an update as some things have changed since my last update a year ago and we never really gave an update on our new plans.
Over the past months we have been working to support KMP and so this is now actually on our roadmap. We have been migrating to XPoet to support Kotlin generation, but even with that nearing completion, there are still a number of hurdles to cross like issues with nullability, visibility, generic types, and dependencies like our dependency on
javaxandjakarta. There’s no clear date when this will be done, especially since we’re still working on supporting KSP2 which is in itself a blocker for KMP, but we thought we should update this since we are at least working on it.We’re still here =)
imSathish commentedon Sep 17, 2025
Any Update on KMP support
GXBaum commentedon Aug 3, 2026
Hey, I was wondering if there are any updates on KMP support, or if I missed any?
Is this still on the roadmap?
Thanks in advance!
bcorso commentedon Aug 11, 2026
@GXBaum yes, this is still on the roadmap. The progress slowed/stopped due to multiple issues -- first, the switch from KSP1 to KSP2, and then the shift to focus on KSP performance issues. However, the performance work is wrapping up and we are now in a position to get back to this soon.