Last active
February 10, 2019 14:19
-
-
Save matzuk/817b52138091169fd399b380d5a96139 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// 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