Created
January 28, 2023 05:35
-
-
Save ashwinraghav/af2679e974cf034acba4a8f39d357d5e to your computer and use it in GitHub Desktop.
Composable Libraries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Keep | |
public class AbtRegistrar implements ComponentRegistrar { | |
private static final String LIBRARY_NAME = "fire-abt"; | |
@Override | |
public List<Component<?>> getComponents() { | |
return Arrays.asList( | |
Component.builder(AbtComponent.class) | |
.name(LIBRARY_NAME) | |
.add(Dependency.required(Context.class)) | |
.add(Dependency.optionalProvider(AnalyticsConnector.class)) | |
.factory( | |
container -> | |
new AbtComponent( | |
container.get(Context.class), | |
container.getProvider(AnalyticsConnector.class))) | |
.build(), | |
LibraryVersionComponent.create(LIBRARY_NAME, BuildConfig.VERSION_NAME)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment