0

I try to make Roboblender work with Roboguice but the compile time processing doesn't seem to do anything, the AnnotationDatabaseImpl class is not generated. (Project builds without error.)

I even created a sample project, please see below. What do I miss? (I know the gradle task and the second metadata would only be needed for multi module project, but it didn't work without them either).

build.gradle:

project.tasks.withType(JavaCompile) { task ->
    options.compilerArgs << "-AguiceAnnotationDatabasePackageName=gk.com.roboguice_compile"
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.0.0'
    compile 'org.roboguice:roboguice:3.+'
    provided 'org.roboguice:roboblender:3.+'
}

manifest:

    <meta-data
        android:name="roboguice.modules"
        android:value="gk.com.roboguice_compile.RoboguiceBindings" />

    <meta-data
        android:name="roboguice.annotations.packages"
        android:value="gk.com.roboguice_compile" />

activity:

@ContentView(R.layout.activity_main)
public class MainActivity extends RoboActivity {

    @Inject
    private PresentMaker presentMaker;

bindings:

public class RoboguiceBindings extends AbstractModule {

    @Override
    protected void configure() {
        bind(PresentMaker.class).to(BirthdayPresentMaker.class);
    }
}
JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
levavare
  • 494
  • 1
  • 4
  • 13

1 Answers1

0

The AnnotationDatabaseImpl was there but only under the build directory not among the source files.

My bad, probably every annotation processor work like this. (Although strangely this project has the AnnotationDatabaseImpl generated in the project root..).

levavare
  • 494
  • 1
  • 4
  • 13