Specify the order of the build commands in an Eclipse Project, or add build commands after the java build command

In an Eclipse project, I want to add a build command for checkstyle, as follows:

eclipse.project {
     natures 'net.sf.eclipsecs.core.CheckstyleNature'
    buildCommand 'net.sf.eclipsecs.core.CheckstyleBuilder'
}

But the Eclipse Checkstyle plugin complains that the checkstyle builder must be put after the java builder, and asks me to change the order in the builders dialog. How can I specify the order of the build commands when generating the project, or make sure that a build command is added after the java build command that is added by default?

Did you try this:

eclipse.project {
  buildCommands = ['org.eclipse.jdt.core.javabuilder', 'net.sf.eclipsecs.core.CheckstyleBuilder']
}

Hope that helps!