I recently added a new file to my project that contains many inner classes. Eclipse compiled it without complaints, and I made a commit to my git repo. Then Travis-CI triggered, and got an error. I thought it was Travis, but it turned out to be Gradle. It was erroring on some of the inner classes. Not sure why it’s doing it and not Eclipse.
Eclipse is less strict than Gradle, hence it’s not uncommon for a problem to only surface in Gradle. Perhaps the build is missing a dependency declaration, or Gradle and Eclipse are using different Java versions, or something else is configured differently. It’s more likely a problem with the build than a problem with Gradle.
The Eclipse build (as set up by Gradle) is less strict than the Gradle build, hence it’s not uncommon for a problem to only surface in Gradle. Perhaps the build is missing a dependency declaration, or Gradle and Eclipse are using different Java versions, or something else is configured differently. It’s more likely a problem with the build than a problem with Gradle.
If I’m missing a dependency then that’s very weird considering that the current code trying to compile has none except Java. Gradle + Eclipse are both compiling against 1.6. The problem seems to be that the main java classes aren’t being used with the test classes, for some unknown reason. They’re reported in the --debug area for being added to the javac command.
If I’m missing a dependency then that’s very weird considering that the current code trying to compile has none except Java. Gradle + Eclipse are both compiling against 1.6. The problem seems to be that the main java classes aren’t being used with the test classes, for some unknown reason. They’re reported in the --debug area for being added to the javac command.
That’s some seriously complicated usage of nested classes. Could be a difference between OpenJDK and Eclipse compiler, or (less likely) a source encoding problem.