Hilt - @SingletonComponent


Hilt - @SingletonComponent

Hilt 2.28.2 버전부터 @ApplicationComponent 어노테이션이 @SingletonComponent 을 상속받는 형식으로 변경되었고, @ApplicationComponent 가 추후 릴리즈에서 제거된다고 알렸다. 이 말을 듣고 나니 @ApplicationComponent 인 모듈에서는 @Singleton 없이도 싱글톤으로 동작을 했었나??? @Singleton 을 없애고 돌려봤다. 미친 듯이 찍어 내는 걸 보니 아니다. 이슈를 훑어보니, hilt를 순수 자바 / 코틀린에서 도입할 경우 @ApplicationComponent 란 이름을 사용하는 것이 무슨 의미가 있는가? @ActivityScoped 와 같은 scope 역시 의미가 있는가? 라는 이슈가 있었고, 그에 대한 해답으로 @Sin..


원문링크 : Hilt - @SingletonComponent