Skip to content

Instantly share code, notes, and snippets.

@tfcporciuncula
Last active March 8, 2023 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tfcporciuncula/40695f5fb3a21d358dcf0da7590ee4ca to your computer and use it in GitHub Desktop.
Save tfcporciuncula/40695f5fb3a21d358dcf0da7590ee4ca to your computer and use it in GitHub Desktop.
- import javax.inject.Inject
- import javax.inject.Singleton
+ import me.tatarka.inject.annotations.Inject

- @Singleton
- class PlatformGreeter @Inject constructor(
+ @Inject @Singleton
+ class PlatformGreeter(
+ @Scope
+ @Target(CLASS, FUNCTION, PROPERTY_GETTER)
+ annotation class Singleton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment