Problem with dagger2 + Groovy

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?

Are you sure DaggerGlobalComponent is on your classpath?

This suggests you forgot to add an import on DaggerGlobalComponent: it says it cannot find a variable. If you had an import, it would either pass compilation or fail saying the class is not found on classpath.

This is an auto generated class by Dagger, but is not being generated