Before_script section is ignored for some reason

This is the link to my configuration script. And here is the latest failed build. I’m not sure what the problem is. I have verified that build_script is indeed a job lifecycle, but I have tried three times now and I get the same failed build because the build_script section is not being run.

I also know this should work because I have seen another project which uses a similar syntax and travis seems to be working for that project.

There is another issue on the github issues page that mentions something like this, but it seems they are actually talking about before_install:

So it looks like it’s not the case that before_script is being skipped, but rather that travis decides to run gradle assemble as the default install task if none is specified for a java project.

To fix this, I simply added an install step which echoes the issue that led me to this conclusion:

 - echo ''

There seems to be disagreement in Travis job lifecycle design on whether building of the user’s project should occur at the install or the script stage.

Java stock script assumes the former, so if you need to run something before building your project, add it to the before_install: section.

Not sure what you mean by this. Can you elaborate?