Closed gtheimer closed 7 years ago
Can you link me a sample project with which I can reproduce this issue with?
Thanks, I have downloaded and took a look at your project. It seems that the net.ltgt.apt plugin is abusing Gradle. You can work around the issue by adding this:
if (project.hasProperty('evaluatingIDE') && project.property('evaluatingIDE') == 'NetBeans') {
sourceSets {
main {
java {
srcDir compileJava.generatedSourcesDestinationDir
}
}
}
}
This works. Many thanks to Attila.
I am using NetBeans 8.2, Gradle 4.1, netbeans-gradle 1.4.2, and Dagger 2.
Building a Java program that uses Dagger 2 with Gradle works on the command line. Running the build in NetBeans also produces executuable code, however, the problem is that NB marks symbols defined in the Dagger-generated code with red underlines ("error parsing file"). Apparently, NB does not see the generated Java code. Is there a work-around for this problem?