How does Buildship create the .classpath file for Eclipse?

Your observation is correct, Buildship doesn’t call eclipseClasspath directly. It reads the configuration from the java and the eclipse Gradle plugins via the Gradle Tooling API and sets the values by using Eclipse JDT’s API. You can customize the content of the .classpath file via the eclipse.classpath.file.whenMerged block. You’ll find examples how to that in the Buildship 1.0.18 release announcement.