I'm probably missing something very basic here, so hopefully it's not a hard question.
My equivalent of
CoffeeShop coffeeShop = DaggerCoffeeShop.create();
is not being recognised by the IDE (IntelliJ). This is a native Java project. The "DaggerCoffeShop" part is all red.
The component is using this syntax:
@Component(modules = <ModuleClassName>.class)
public interface CoffeeShop {
// some methods.
// does it matter what goes in here for it to recognise the component?
}
The "ModuleClassName" is the name of a module annotated with @Module and includes @Provides methods.
To get the libs I'm using this in Gradle:
compile 'com.google.dagger:dagger:2.4'
compile 'com.google.dagger:dagger-compiler:2.4'
Is that all I need? I don't get any errors for any of the annotations, it's just this Dagger keyword it can't recognise. What am I missing?
Any help or direction appreciated. I'm not finding the documentation to be that great for beginners like me.