Gradle does not build but Eclipse does

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.

Here’s the log, also since it’s Travis you can find the project linked as well: https://travis-ci.org/TechShroom/UnplannedDescent/jobs/29466023

I just ran

gradle check --debug

for some more information, and the classpath is being passed fine. I checked the folders and everything is fine concerning the structure.

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.

I’m going to try de-nesting some of them to see if it goes okay.

De-nesting the Step classes fixed it. This breaks part of the system I had in mind, but I guess it will work this way.