Do source set compile tasks automatically depend on the normal compileJava task?

Does the compileJava task from the java plugin depend on the compileSourceSetJava task of any source sets I’ve created? Or do I need to manually use dependsOn to make sure all source sets are compiled when I run compileJava?

The manual says compileJava depends on:

All tasks which produce the compile classpath. This includes the jar task for project dependencies included in the compile configuration.

I’m not sure if this includes source set compile tasks.