Skip to content

fix(di): add @JvmStatic to AppModule @Provides methods for sideload flavor build - #523

Closed
Himanth-reddy wants to merge 1 commit into
ProdigyV21:mainfrom
Himanth-reddy:fix/hilt-appmodule-jvmstatic
Closed

fix(di): add @JvmStatic to AppModule @Provides methods for sideload flavor build#523
Himanth-reddy wants to merge 1 commit into
ProdigyV21:mainfrom
Himanth-reddy:fix/hilt-appmodule-jvmstatic

Conversation

@Himanth-reddy

Copy link
Copy Markdown
Collaborator

Summary

Adds to methods inside object.

Problem

When compiling variant-specific builds like , Dagger Hilt fails with missing binding errors () because Kotlin methods without generate instance methods on rather than static providers.

Solution

Adding to all functions in ensures static provider methods are emitted into Java bytecode, allowing Hilt Dagger annotation processing to resolve all bindings across all build variants.

@Himanth-reddy

Copy link
Copy Markdown
Collaborator Author

Replaced by same-repository stacked PR #525

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant