Skip to content

Instantly share code, notes, and snippets.

@matzuk
Last active February 10, 2019 14:19
Show Gist options
  • Save matzuk/817b52138091169fd399b380d5a96139 to your computer and use it in GitHub Desktop.
Save matzuk/817b52138091169fd399b380d5a96139 to your computer and use it in GitHub Desktop.
// create implementation of ScannerFeatureDependencies in api-module like this
public class ScannerFeatureDependenciesLegacy implements ScannerFeatureDependencies {
@Override
public DbClientApi dbClient() {
return new DbClientLegacy();
}
@Override
public HttpClientApi httpClient() {
// some legacy
// the important thing is that we implement our api
return NetworkFabric.createHttpClientLegacy();
}
@Override
public SomeUtils someUtils() {
return new SomeUtils();
}
@Override
public PurchaseInteractor purchaseInteractor() {
return new PurchaseInteractorLegacy();
}
}
// and somewhere we initialize the graph
ScannerFeatureComponent.initAndGet(
new ScannerFeatureDependenciesLegacy()
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment