Parallel execution with multiple subprojects

I am trying to improve the performance of our gradle build and I thought the easy win would have been to try parallel execution, because I have 3 long running tasks in 3 of my submodules (all of them tests).

So I thought by parallelizing the task execution I could easily win 10 minutes. In my subprojects I declare cross-module dependencies on project level like this:

subprojectA’s build.gradle :

dependencies {
    implementation project(':sub-project-b')
}

Does this lead to task dependencies? Because now when I try parallell execution, my tasks fail. Once because compileKotlin of subprojectA can’t find the classes it requires from subprojectB, another time for other dependencies.

I know I can declare dependencies between tasks with mustRunAfter but that sounds kind of wrong, are no task dependencies created by the project dependency?