Skip to content
This repository was archived by the owner on Aug 20, 2025. It is now read-only.
This repository was archived by the owner on Aug 20, 2025. It is now read-only.

@Provides within a companion object not being injected #218

@johncara

Description

@johncara

If I try to provide an object using the following code; Dagger works, but Reflect doesn't:

@Module
interface MyModule {

    companion object {
        @Provides
        fun providesString(): String = "Hello"
    }
}

Same is true if MyModule is a class or an abstract class.

Perhaps this is covered by what's described in this limitation? https://github.com/JakeWharton/dagger-reflect#abstract-classes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions