Im trying to get it work (Dagger2 + Groovy) and it does not auto-generate classes (DaggerGlobalComponent):
Application:
component = DaggerGlobalComponent.builder()
.busModule(new BusModule())
.serviceModule(new ServiceModule())
.contextModule(new ContextModule(this))
.persistenceModule(new PersistenceModule(this))
.build();
build.gradle:
androidGroovy {
options {
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
groovyOptions.fork = false
}
}
gradle-wrapper.properties:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
The error:
Error:(37, 21) error: cannot find symbol variable DaggerGlobalComponent
startup failed:
Compilation failed; see the compiler error output for details.
Error:Execution failed for task ':app:compileDevelDebugGroovy'.
Compilation failed; see the compiler error output for details.
BUILD FAILED
any ideas?