Gradle not running tests
You're saying that the main SourceSet should contain the test directory. This directory should be set in the test SourceSet.
A note for people using Junit5, we need to include the below to enable it - that is, running junit5 tests is not enabled by default.
test {
useJUnitPlatform()
}
Replace sourceSets with below simple snippet:
sourceSets.main.java.srcDirs = ['src']
sourceSets.test.java.srcDirs = ['tst']