Closed alorma closed 8 years ago
Move the condition inside the method and alter the return value based on it. Alternatively, you can apply different modules based on the API level. Both of these are vastly more powerful since you can actually use runtime state in your conditionals (something that is required for your non-working example).
I get a use case where i needed two different interfaces to be provided with the same name, depending on API version (android)
JobScheduler appears on Android Lollipop, so it will be great to have something like:
This will work like this:
@provides
are annotated with same@named
it will not compile@named
have a@condition
annotation: